// Use this link for popup windows
// <a onfocus="this.blur()" onclick="popWin(this.href,'popupwin','600','440','center','no','no','no','no','no','no','no');return false" href="page.htm">

var win=null;
function popWin(url,popname,w,h,pos,scrl,loc,dir,sts,mb,tbr,rsz){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=10;TopPosition=10}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrl+',location='+loc+',directories='+dir+',status='+sts+',menubar='+mb+',toolbar='+tbr+',resizable='+rsz+'';
	win=window.open(url,popname,settings);
}


// Past the script language in head of HTML document
// <script language="JavaScript">thisWindowName('main');</script>
// In link make your target="main"

function thisWindowName(name) {  
	if (document.images)
  	self.name = name;
}


// Hide Email with mouseover fuction
// Paste this script where you want to hide your email
// <script language="JavaScript">writeEmailGrfx('info', 'jrweb.net')</script>

function writeEmailGrfx(eName, eServer)
{
emailname = eName;
emailserver = eServer;
emailadresse = emailname + "@" + emailserver;

document.write("<a href='mailto:" + emailname + "@" + emailserver + "?subject=This is your subject' ");
document.write("onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('bt-mail','','/grfx/bt-mail-on.gif',1)\">");
}


// Hide Email normal
// Paste this script where you want to hide your email
// <script language="JavaScript">writeEmail('info', 'jrweb.net')</script>

function writeEmail(eName, eServer)
{
emailname = eName
emailserver = eServer

document.write("<a href='mailto:" + emailname + "@" + emailserver + "?subject=This is your subject'>");
document.write(emailname + "@" + emailserver);
document.write("</a>");
}


// Switch between languages FR to EN or vice versa
// Paste this as your link
// <a href="javascript:goswitchEn();">English</a>
// <a href="javascript:goswitchFr();">Français</a>

function goswitchEn(){
var thisurl = unescape(document.URL);
var targurl = thisurl.replace('172.16.1.27/','172.16.1.27/en/');
location.href=targurl;
}

function goswitchFr(){
var thisurl = unescape(document.URL);
var targurl = thisurl.replace('172.16.1.27/en/','172.16.1.27/');
location.href=targurl;
}