function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function showLayer(layername) {
var layertodisplay=layername;

 if (layertodisplay==1) {
        if (document.layers) {
           document.layers["qpro"].visibility='visible'; 
           document.layers["wkbn"].visibility='hidden';
           document.layers["prod"].visibility='hidden';

        }
        else if (document.all) {
           document.all["qpro"].style.visibility='visible';
           document.all["wkbn"].style.visibility='hidden';
           document.all["prod"].style.visibility='hidden';

        }
        else if (!document.all && document.getElementById) {
           document.getElementById("qpro").style.visibility='visible'; 
           document.getElementById("wkbn").style.visibility='hidden'; 
           document.getElementById("prod").style.visibility='hidden'; 

        }
}

 if (layertodisplay==2) {
        if (document.layers) {
           document.layers["qpro"].visibility='hidden'; 
           document.layers["wkbn"].visibility='visible';
           document.layers["prod"].visibility='hidden';

        }
        else if (document.all) {
           document.all["qpro"].style.visibility='hidden';
           document.all["wkbn"].style.visibility='visible';
           document.all["prod"].style.visibility='hidden';

        }
        else if (!document.all && document.getElementById) {
           document.getElementById("qpro").style.visibility='hidden'; 
           document.getElementById("wkbn").style.visibility='visible'; 
           document.getElementById("prod").style.visibility='hidden'; 

        }

 }

 if (layertodisplay==3) {
        if (document.layers) {
           document.layers["qpro"].visibility='none'; 
           document.layers["wkbn"].visibility='hidden';
           document.layers["prod"].visibility='visible';

        }
        else if (document.all) {
           document.all["qpro"].style.visibility='hidden';
           document.all["wkbn"].style.visibility='hidden';
           document.all["prod"].style.visibility='visible';

        }
        else if (!document.all && document.getElementById) {
           document.getElementById("qpro").style.visibility='hidden'; 
           document.getElementById("wkbn").style.visibility='hidden'; 
           document.getElementById("prod").style.visibility='visible'; 

        }
 }


}

function openimg(prm_img)
{
        if (prm_img != '')
        {
                wrk_window = window.open('images/' + prm_img,"Quotium","width=700,height=550,status=yes,location=no,toolbar=no,menubar=no,directories=no,resizable=yes,scrollbars=yes");
                wrk_window.focus();
        }        
}

function openimgus(prm_img)
{
        if (prm_img != '')
        {
                wrk_window = window.open('images/' + prm_img,"Quotium","width=700,height=550,status=yes,location=no,toolbar=no,menubar=no,directories=no,resizable=yes,scrollbars=yes");
                wrk_window.focus();
        }        
}

function newsletter_form(form_name)
{
        if (form_name != '')
        {
                wrk_window = window.open(form_name,"Quotium","width=290,height=300,status=yes,location=no,toolbar=no,menubar=no,directories=no,resizable=yes,scrollbars=yes");
                wrk_window.focus();
        }        
}


MM_reloadPage(true);

/********************************************************************************************************************************/

function openMap(loc)	{
	var dloc, popup;
	dloc = 'map/map.php?plan=' + loc;
	popup = window.open(dloc, 'Aggrandissement_Plan', 'resizable=yes, menubar=1, width=815, height=615, screenX=150, screenY=150, top=150, left=150');
}

<!--
function printPage() {
	var pageTitle = document.getElementById("titlePrint").innerHTML;	// Define Title
	var pageZone = document.getElementById("divPrint").innerHTML;			// Define Content
	
	if ( document.getElementById("subTitlePrint") != null )	{
		var pageSubTitle = document.getElementById("subTitlePrint").innerHTML;	// Define subTitle
		var Headers = getHeadersPrint(pageTitle, pageSubTitle);
	}
	else	{
		var Headers = getHeadersPrint(pageTitle, "");
	}
	var Footers = getFootersPrint();
	
	// Open a new Window
	var frame = window.open("", "Print_Page", "width=660, height=600, toolbar=0, menubar=1, scrollbars=1, resizable=0, status=0, location=0, left=10, top=10");
	
	// Add data
	frame.document.write("" + Headers + pageZone + Footers);
	frame.document.close();
	return;
}

function getHeadersPrint(title, subTitle)	{
	var gHeaders = '';
	gHeaders += '<HTML>\n';
	gHeaders += '\t<HEAD>\n';
	gHeaders += '\t\t<TITLE>Quotium: Print Page</TITLE>\n';
	gHeaders += '\t\t<LINK rel="stylesheet" href="../www/font_style.css" type="text/css">\n';
	gHeaders += '\t\t<LINK rel="stylesheet" href="../www/global_style.css" type="text/css">\n';
	gHeaders += '\t\t<style>\n';
	gHeaders += '\t\t.celluleprint 	{\n';
	gHeaders += '\t\t\tpadding-top: 5px;\n';
	gHeaders += '\t\t\tpadding-right: 5px;\n';
	gHeaders += '\t\t\tpadding-left: 5px;\n';
	gHeaders += '\t\t}\n';
	gHeaders += '\t\t</style>\n';
	gHeaders += '\t</HEAD>\n';
	gHeaders += '\t<BODY bgcolor="#FFFFFF" onload="window.print();">\n'; //  window.close();
	gHeaders += '\t\t<TABLE width="600" align="center" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0">\n';
	gHeaders += '\t\t\t<TR valign=top>\n';
	gHeaders += '\t\t\t\t<TD class="celluleprint">\n';
	gHeaders += '\t\t\t\t\t<TABLE width="100%" border="0">\n';
	gHeaders += '\t\t\t\t\t\t<TR height="50px">\n';
	gHeaders += '\t\t\t\t\t\t\t<TD width="40%" align="left"><img src="../images/logos/logo_print.png" /></TD>\n';
	gHeaders += '\t\t\t\t\t\t\t<TD width="60%" align="right"><font class="normal_20_red">' + title + '</font></TD>\n';
	gHeaders += '\t\t\t\t\t\t</TR>\n';
	gHeaders += '\t\t\t\t\t\t<TR height="10px">\n';
	gHeaders += '\t\t\t\t\t\t\t<TD align="center" valign="top" colspan="2"><HR /></TD>\n';
	gHeaders += '\t\t\t\t\t\t</TR>\n';
	gHeaders += '\t\t\t\t\t</TABLE>\n';
	gHeaders += '\t\t\t\t\t<font class="bold_14_black">' + subTitle + '</font><br />\n';
	return gHeaders;
}

function getFootersPrint()	{
	var gFooters = '';
	gFooters += '\t\t\t\t\t<BR />\n';
	gFooters += '\t\t\t\t\t<HR />\n';
	gFooters += '\t\t\t\t\tQuotium Technologies &copy;2007 - All rights reserved. \n';
	gFooters += '\t\t\t\t</TD>\n';
	gFooters += '\t\t\t</TR>\n';
	gFooters += '\t\t</TABLE>\n'; 
	gFooters += '\t</BODY>\n';
	gFooters += '</HTML>';
	
	return gFooters;
}
//-->

<!--
function openPopup(fileName)	{
	var File = new Array;
	File = getDescriptionPopup(fileName);
	fileLink = File[0];
	fileTitle = File[1];
	fileDesc = File[2];
	
	var Headers = getHeadersPopup();
	var Footers = getFootersPopup(fileTitle, fileDesc);
	
	var image = '\t\t\t\t\t<img src="../images/' + fileLink + '" alt="Quotium: Aggrandissement Capture Ecran" name="imagePopup" onclick=\'window.close();\'>';
	
	// Open a new Window
	var frame = window.open("", "Popup", "width=800, height=600, resizable=1, scrollbars=1, menubar=1, toolbar=0, status=0, location=0, left=200, top=200");
	
	// Add data
	frame.document.write("" + Headers + image + Footers);
	frame.document.close();
	return;
}

function getHeadersPopup()	{
	var gHeaders = '';
	gHeaders += '<HTML>\n';
	gHeaders += '\t<HEAD>\n';
	gHeaders += '\t\t<TITLE>Popup Display Screenshot</TITLE>\n';
	gHeaders += '\t\t<LINK rel="stylesheet" href="../www/font_style.css" type="text/css">\n';
	gHeaders += '\t\t<SCRIPT language="JavaScript" type="text/JavaScript" src="../js/quotium_global.js"></SCRIPT>\n';
	gHeaders += '\t</HEAD>\n';
	gHeaders += '\t<BODY bgcolor="#FFFFFF" onload=\'checkSize()\'>\n';
	gHeaders += '\t\t<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">\n';
	gHeaders += '\t\t\t<TR>\n';
	gHeaders += '\t\t\t\t<TD><img src="../images/logos/logo_popup.gif"></TD>\n';
	gHeaders += '\t\t\t</TR>\n';
	gHeaders += '\t\t</TABLE>\n';
	gHeaders += '\t\t<TABLE width="100%" align="center" cellspacing="0" cellpadding="7" border="0">\n';
	gHeaders += '\t\t\t<TR>\n';
	gHeaders += '\t\t\t\t<TD align="center" valign="top" width="100%">\n';
	return gHeaders;
}

function getFootersPopup(title, desc)	{
	var gFooters = '';
	gFooters += '\t\t\t\t</TD>\n';
	gFooters += '\t\t\t</TR>\n';
	gFooters += '\t\t\t<TR>\n';
	gFooters += '\t\t\t\t<TD align="center" valign="middle" width="100%">\n';
	gFooters += '\t\t\t\t\t<DIV><H3>' + desc + '</H3></DIV>\n';
	gFooters += '\t\t\t\t</TD>\n';
	gFooters += '\t\t\t</TR>\n';
	gFooters += '\t\t</TABLE>\n'; 
	gFooters += '\t</BODY>\n';
	gFooters += '</HTML>';
	return gFooters;
}

function getDescriptionPopup(file)	{
	var descTab = new Array;
	
	// Solutions
	descTab["itil"] = new Array("schemas/itil.png", "ITIL", "Schematic representation of the version 3");
	
	// QTest
	descTab["LoadTestView"] = new Array("qtest/LoadTestView.png", "Load Test view", "Load test view");
	
	//descTab["qtest01"] 		= new Array("schemas/qtest01.png", "schema_01", "Description ");
	descTab["qtest02"] 		= new Array("schemas/qtest02.png", "schema_02", "Qtest features");
	
	descTab["cpu"] 					= new Array("qtest/cpu.png", "cpu", "Linux Monitor: Monitoring the CPU activity ");
	descTab["processes"] 		= new Array("qtest/processes.png", "processes", "Linux Monitor: Monitoring the processes activity");
	descTab["Web_Modules"] 	= new Array("qtest/Web_Modules.png", "Web_Modules", "WebSphere 6 Monitor: Web Modules");
	descTab["WebSphere_Server"] = new Array("qtest/WebSphere_Server.png", "WebSphere_Server", "WebSphere 6 Monitor: Monitoring the CPU and the memory activity");
	
	descTab["AnomaliesProfile"] = new Array("qtest/AnomaliesProfile.png", "AnomaliesProfile", "Setting the anomaly detection rules");
	descTab["anomaliesList"] 		= new Array("qtest/anomaliesList.png", "anomaliesList", "Detected anomalies list");
	
	descTab["ReportDesigner"] = new Array("qtest/ReportDesigner.png", "ReportDesigner", "Creating report templates");
	descTab["ReportDesignerChart"] = new Array("qtest/ReportDesignerChart.png", "ReportDesignerChart", "Creating graph templates");
	descTab["GenerateReport"] = new Array("qtest/GenerateReport.png", "GenerateReport", "Genereting a report");
	descTab["report"] 			= new Array("qtest/report.png", "report", "A Qtest report");
	
	descTab["webservice1"] = new Array("qtest/webservice1.png", "webservice1", "Creating screnarios for Web services tests");
	
	// Qap
	descTab["pet_shop"] = new Array("qap/pet_shop.png", "pet_shop", "Monitoring a website in real time, in particular the response times.");
	descTab["dashboard"] = new Array("qap/dashboard.png", "dashboard", "Qap dashboard");
	descTab["reporting_01"] = new Array("qap/reporting_01.png", "reporting_01", "Qap reporting");
	descTab["reporting_02"] = new Array("qap/reporting_02.png", "reporting_02", "A Qap report");
	
	descTab["JCA_Ressources"] = new Array("qap/JCA_Ressources.png", "JCA_Ressources", "JBOSS Monitor");
	descTab["Physical_Disk"] = new Array("qap/Physical_Disk.png", "Physical_Disk", "Windows Monitor");
	
	// QMonitor
	descTab["Web_Modules_JBoss"] = new Array("qmonitor/Web_Modules.png", "Web_Modules", "JBOSS Monitor: Web Modules");
	descTab["System"] = new Array("qmonitor/System.png", "System", "Windows Monitor: System Information ");
	
	return descTab[file];
}

// Function Resize Popup
function checkSize() {
	// If image completly downloaded
	if (document.images[1].complete) {
		//Navigator Verification
		//alert("appName => " + navigator.appName);
		if ( navigator.appName == "Microsoft Internet Explorer" )	{
			var checkWidth = document.images[1].width + 140;
			var checkHeight = document.images[1].height + 100;
		}
		else if ( navigator.appName == "Opera" )	{
			var checkWidth = document.images[1].width + 40;
			var checkHeight = document.images[1].height + 165;
		}
		else {
			var checkWidth = document.images[1].width + 40;
			var checkHeight = document.images[1].height + 170;
		}
	
		var PosX = ( screen.availWidth - checkWidth ) / 2; 
		var PosY = ( screen.availHeight - checkHeight ) / 2; 
		
		window.resizeTo(checkWidth, checkHeight);
		window.moveTo(PosX,PosY);
		window.focus();
	}
	else {
		setTimeout('checkSize()',25);
	}
}
//-->


function openDemo(product)	{
	
	var path = "http://www.quotium.com/products/";
	
	if(product == "qtest")	{
		var demo_path = path + "TechDemo/QTest_Demo.php?product=qtest&demo=demo_principale";
	}
	else if(product == "qap")	{
		var demo_path = path + "QAPDemo/Qap_Demo.php?product=qap&demo=demo_principale";
	}
	// Open a new Window
	var frame = window.open(demo_path, "Quotium_Demo", "width=800, height=600, resizable=0, scrollbars=0, menubar=0, toolbar=0, status=0, location=0, left=200, top=200");

	return;
}