function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// function for opening a new browser with a name and all the functionnalities

function opennewbrowserwithname(strURL, strName, intWidth, intHeight){
	var newWindow;
	
	newWindow = window.open(strURL,strName,'left=100,top=100,width='+intWidth+',height='+intHeight+',resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes');
	newWindow.focus();
}

// function for opening a new browser with a name and without all the functionnalities
function opennewwindowwithname(strURL, strName, intWidth, intHeight){
	var newWindow;
	
	newWindow = window.open(strURL,strName,'left=100,top=100,width='+intWidth+',height='+intHeight+',resizable=no,scrollbars=yes,menubar=no,toolbar=no,location=no,status=no');
	newWindow.focus();
}

// function for opening a new browser with all the functionnalities
function opennewbrowser(strURL, intWidth, intHeight){
	window.open(strURL,'','left=100,top=100,width='+intWidth+',height='+intHeight+',resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,location=yes,status=yes');
}

// function for opening a new browser without all the functionnalities
function opennewwindow(strURL, intWidth, intHeight){
	window.open(strURL,'','left=100,top=100,width='+intWidth+',height='+intHeight+',resizable=no,scrollbars=yes,menubar=no,toolbar=no,location=no,status=no');
}

//function for opening a pop-up window with a close button
function popwindow (strTitle, strText, strButtonText, showMenubar, showToolbar, showLocation, showStatus){
	var openedWindow;
	var strFinalText;
	var strOptions;
	var strMenubar = '';
	var strToolbar = '';
	var strLocation = '';
	var strStatus = '';
	
	if (showMenubar) strMenubar = ',menubar=yes';
	if (showToolbar) strToolbar = ',toolbar=yes';
	if (showLocation) strLocation = ',location=yes';
	if (showStatus) strStatus = ',status=yes';
	
	strOptions = strMenubar + strToolbar + strLocation + strStatus;
	
	openedWindow = window.open('','popup1','left=100,top=100,width=300,height=200,resizable=no,scrollbars=no' + strOptions);
	
	strFinalText = '<html>\n<head>\n<title>' + strTitle + '</title>\n</head>\n<body>\n' + strText;
	strFinalText += '\n<form>\n<center>\n';
	strFinalText += '<input type="button" onclick="window.close();" value="' + strButtonText + '">'
	strFinalText += '\n</center>\n</form>\n</body>\n</html>';
	
	openedWindow.document.write(strFinalText);
}
