/*
'*************************************************************************************************************
' Copyright (C) 2001, The Hartford Steam Boiler Inspection and Insurance Company.  All Rights Reserved.
'*************************************************************************************************************
*/
//preload menu images
var arrHomeImgs = new Array();
arrHomeImgs[0] = new Image(); 
arrHomeImgs[0].src = "images/menubarhometop.gif";
arrHomeImgs[1] = new Image();
arrHomeImgs[1].src = "images/menu-home-teal.gif";
arrHomeImgs[2] = new Image();
arrHomeImgs[2].src = "images/menu-home-green.gif";
arrHomeImgs[3] = new Image();
arrHomeImgs[3].src = "images/menu-home-red.gif";

var arrMenuImgs = new Array();
arrMenuImgs[0] = new Image(); 
arrMenuImgs[0].src = "images/menutop.gif";
arrMenuImgs[1] = new Image();
arrMenuImgs[1].src = "images/menu-home-teal.gif";
arrMenuImgs[2] = new Image();
arrMenuImgs[2].src = "images/menu-home-green.gif";
arrMenuImgs[3] = new Image();
arrMenuImgs[3].src = "images/menu-red.gif";
arrMenuImgs[4] = new Image();
arrMenuImgs[4].src = "images/menu-home-blue.gif";
arrMenuImgs[5] = new Image();
arrMenuImgs[5].src = "images/menu-darkred.gif";
arrMenuImgs[6] = new Image();
arrMenuImgs[6].src = "images/menu-darkred3.gif";

// hold the currently displayed menu
var currentMenu="";
var orgWidth;
var orgName; 
		
function buildHomeMenu() {
	//build the menu bar at the top
	strMenu = "<div name=\"menubar\" id=\"menubar\" class=\"menubarhome\"><img src=\"images/menubarhometop.gif\"/></div>";
	document.write(strMenu);
	
	strMenu = "<div name=\"menubartitles\" id=\"menubartitles\" class=\"menubarhome\">"  + 
	"	<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\" width=\"398\">" + 
	"		<tr>" +
	"			<td width=\"141\" align=\"center\" class=\"menutitle\">About TOGA</td> " +
	"			<td width=\"128\" align=\"center\" class=\"menutitle\">Helpful Info</td> " +
	"			<td width=\"129\" align=\"center\" class=\"menutitle\">Contact Us</td> " +
	"		</tr>" +
	"	</table>" +
	"</div>";
	document.write(strMenu);
	buildAboutMenu("menubarhome1", arrHomeImgs[1].src,25);	
	buildHelpMenu("menubarhome2", arrHomeImgs[2].src);
	buildContactMenu("menubarhome3", arrHomeImgs[3].src);
}

function buildMenu() {
	strMenu = "<div name=\"menubar\" id=\"menubar\" class=\"menubar\"><img src=\"images/menutop.gif\"/></div>";
	document.write(strMenu);
	strMenu = "<div name=\"menubartitles\" id=\"menubartitles\" class=\"menubar\">"  + 
	"	<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\" width=\"758\" >" + 
	"		<tr>" +
	"			<td width=\"5\" align=\"center\"></td> " +	
	"			<td width=\"100\" align=\"center\"><a href='javascript:' class=\"menutitle\" onmouseover=\"showMenu('about')\">About TOGA</a></td> " +
	"			<td width=\"100\" align=\"center\"><a href='javascript:' class=\"menutitle\" onmouseover=\"showMenu('help')\">Helpful Info</a></td> " +
	"			<td width=\"100\" align=\"center\"><a href='javascript:' class=\"menutitle\" onmouseover=\"showMenu('contact')\">Contact Us</a></td> " +
	"			<td width=\"120\" align=\"center\"><a href='javascript:' class=\"menutitle\" onmouseover=\"showMenu('workbench')\">Workbench</a></td> " 
	//if (orgName > "")
		//strMenu =  strMenu + "			<td width=\"135\" align=\"center\"><a href='javascript:' class=\"menutitlewhite\" onmouseover=\"showMenu('action'); document.all." + orgName + ".style.width='280px';\">Actions</a></td> "; 
	//else
		strMenu =  strMenu + "			<td width=\"135\" align=\"center\"><a href='javascript:' class=\"menutitlewhite\" onmouseover=\"showMenu('action');\">Actions</a></td> ";
	strMenu =  strMenu + "	 		<td width=\"103\" align=\"center\"><a href='' class=\"menutitle\">Log out</a></td> " +
	"		</tr>" +
	"	</table>" +
	"</div>";
	document.write(strMenu);
	buildAboutMenu("menuabout", arrMenuImgs[1].src,25);
	buildHelpMenu("menuhelp", arrMenuImgs[2].src);
	buildContactMenu("menucontact", arrMenuImgs[3].src);
	buildWorkbenchMenu("menuworkbench", arrMenuImgs[4].src);
	if(ses.ROLE == TOGA_EXPERT || ses.ROLE == TOGA_ADMINISTRATOR || ses.ROLE == LAB_BUSINESS_CONTACT)
	{
		buildActionMenu("menuaction", arrMenuImgs[6].src);	
	}
	else
	{
		buildActionMenu("menuaction", arrMenuImgs[5].src);
	}
}

function buildAboutMenu(strClassName, strImgSrc, spacing) {
	strMenu = 	"<div onMouseOut=\"hideMenu(currentMenu)\" name=\"aboutMenu\" id=\"aboutMenu\" class=\"" + strClassName + "\">" + 
				"	<img onMouseOut=\"hideMenu(currentMenu)\" src=\"" + strImgSrc + "\"/>" + 
				"</div>" + 
				"<div name=\"aboutMenuItems\" id=\"aboutMenuItems\" class=\"" + strClassName + "2\">" + 
				"	<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\">" + 
				"		<tr>" + 
				"			<!-- <td><img src=\"images/spacer.gif\" width=\"" + spacing + "\" height=\"1\"></td> --> " + 
				"			<td><a href=\"javascript:fGo(1)\" class=\"menuitem\" >The HSB difference</a></td> " + 
				"		</tr>" + 
				"		<tr>" + 
				"			<!-- <td><img src=\"images/spacer.gif\" width=\"" + spacing + "\" height=\"1\"></td> --> " + 
				"			<td><a href=\"javascript:fGo(2)\" class=\"menuitem\" >Why test?</a></td> " + 
				"		</tr>" + 
				"		<tr>" + 
				"			<!-- <td><img src=\"images/spacer.gif\" width=\"" + spacing + "\" height=\"1\"></td> --> " + 
				"			<td><a href=\"javascript:fGo(3)\" class=\"menuitem\" >Types of tests</a></td> " +  
				"		</tr>" + 
				"		<tr>" + 
				"			<!-- <td><img src=\"images/spacer.gif\" width=\"" + spacing + "\" height=\"1\"></td> --> " + 
				"			<td><a href=\"javascript:fGo(4)\" class=\"menuitem\" >What the results<br>tell you</a></td> " + 
				"		</tr>" + 
				"		<tr>" + 
				"			<!-- <td><img src=\"images/spacer.gif\" width=\"" + spacing + "\" height=\"1\"></td> --> " + 
				"			<td><a href=\"javascript:fGo(5)\" class=\"menuitem\" >Case studies</a></td> " + 
				"		</tr>" + 
				"	</table>" + 
				"</div>";
	document.write(strMenu);
}

function buildHelpMenu(strClassName, strImgSrc) {
	strMenu = 	"<div onMouseOut=\"hideMenu(currentMenu)\" name=\"helpMenu\" id=\"helpMenu\" class=\"" + strClassName + "\">" +
				"	<img onMouseOut=\"hideMenu(currentMenu)\" src=\"" + strImgSrc + "\" />" +
				"</div>" +
				"<div name=\"helpMenuItems\" id=\"helpMenuItems\" class=\"" + strClassName + "2\">" +
				"	<table width=\"125\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">" +
				"		<tr>" +
				"			<!-- <td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> --> " +
				"			<td><a href=\"javascript:fGo(6)\" class=\"menuitem\">Site instructions</a></td> " +
				"		</tr>" +
				"		<tr>" +
				"			<!-- <td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> --> " +
				"			<td><a href=\"javascript:fGo(7)\" class=\"menuitem\">Sample procedure</a></td> " +
				"		</tr>" //+
				//"		<tr>" +
				//"			<td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> " +
				//"			<td><a href=\"javascript:fGo(8)\" class=\"menuitem\">Help videos</a></td> " +
				//"		</tr>"
				//alert("document.title:" + document.title)
				//if (document.title != "Home") //09/19/2006.VH - Changing comparison in order to hide the 2 links in home page.
				if (document.title != "Toga Home Page") 
				{
				strMenu = strMenu + 
				"		<tr>" +
				"			<!-- <td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> --> " +
				"			<td><a href=\"javascript:submitForm(document.forms[1], document.forms['display'],'problemwithorder')\" class=\"menuitem\">Problems with your order</a></td> " +
				"		</tr>" +
				"		<tr>" +
				"			<!-- <td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> -->" +
				"			<td><a href=\"javascript:submitForm(document.forms[1], document.forms['display'],'orderSpareSyringe')\" class=\"menuitem\">Purchase spare syringes</a></td> " +
				"		</tr>"
				}
				
				strMenu = strMenu + 
				"	</table>" +
				"</div>";
	document.write(strMenu);
}

function buildContactMenu(strClassName, strImgSrc) {
	strMenu = 	"<div onMouseOut=\"hideMenu(currentMenu)\" name=\"contactMenu\" id=\"contactMenu\" class=\"" + strClassName + "\">" + 
				"	<img onMouseOut=\"hideMenu(currentMenu)\" src=\"" + strImgSrc + "\" />" + 
				"</div>" + 
				"<div name=\"contactMenuItems\" id=\"contactMenuItems\" class=\"" + strClassName + "2\">" + 
				"	<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\">" + 
				"		<tr>" + 
				"			<!-- <td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> --> " + 
				"			<td><a href=\"mailto:toga@hsb.com\" class=\"menuitem\">Email TOGA Admin</a></td> " + 
				"		</tr>" + 
				"		<tr>" + 
				"		<!--	<td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> --> " + 
				"			<td><a href=\"javascript:openMenuWindow('http://www.hsb.com')\" class=\"menuitem\">Hartford Steam<br>Boiler home page</a></td> " + 				
				"		</tr>" + 
				"		<tr>" + 
				"		<!-- 	<td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> --> " + 
				"			<td class=\"menuitem\">Toll Free Number:<br>1-800-386-2675</td> " + 
				"		</tr>" + 
				"	</table>" + 
				"</div>";
	document.write(strMenu);
}

function buildWorkbenchMenu(strClassName, strImgSrc) 
{
//	alert(ses.ROLE + " = " + LAB_BUSINESS_CONTACT + "/" + LAB_SHIPPING_CONTACT);
	var unit_wb = true;
	var location_wb = true;
	var contact_wb = true;
	var lab_order_wb = true;
	var report_order_wb = true;

	if(ses.ROLE == LAB_BUSINESS_CONTACT || ses.ROLE == LAB_SHIPPING_CONTACT)
	{
			unit_wb = false;
			location_wb = false;
			report_order_wb = false;	
	}
	if(ses.ROLE == CLIENT_SHIPPING_CONTACT)
	{
		unit_wb = false;
	}

	strMenu = 	"<div onMouseOut=\"hideMenu(currentMenu)\" name=\"workbenchMenu\" id=\"workbenchMenu\" class=\"" + strClassName + "\">" + 
				"	<img onMouseOut=\"hideMenu(currentMenu)\" src=\"" + strImgSrc + "\" />" + 
				"</div>" + 
				"<div name=\"workbenchMenuItems\" id=\"workbenchMenuItems\" class=\"" + strClassName + "2\">" + 
				"	<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\">"
	if(unit_wb)
	{
		strMenu = strMenu +
				"		<tr>" + 
				"			<td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> " + 
				"			<td><a href=\"javascript:submitForm(document.forms[1],document.forms['display'],'getUnitWorkbench')\" class=\"menuitem\">Unit</a></td> " + 
				"		</tr>"
	}
	if(location_wb)
	{
		strMenu = strMenu +	
				"		<tr>" + 
				"			<td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> " + 
				"			<td><a href=\"javascript:submitForm(document.forms[1],document.forms['display'],'getLocationWorkbench')\" class=\"menuitem\">Location</a></td> " + 
				"		</tr>"
	}
	if(contact_wb)
	{
		strMenu = strMenu +
				"		<tr>" + 
				"			<td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> " + 
				"			<td class=\"menuitem\"><a href=\"javascript:submitForm(document.forms[1],document.forms['display'],'getContactWorkbench')\" class=\"menuitem\">Contact</a></td> " + 
				"		</tr>"
	}
	if(lab_order_wb)
	{
		strMenu = strMenu +		
				"		<tr>" + 
				"			<td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> " + 
				"			<td><a href=\"javascript:submitForm(document.forms[1],document.forms['display'],'getLabOrderWorkbench')\" class=\"menuitem\"> Lab Order</a></td> " + 
				"		</tr>"
	}	
	if(report_order_wb)
	{
		strMenu = strMenu +		
				"		<tr>" + 
				"			<td><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> " + 
				"			<td><a href=\"javascript:submitForm(document.forms[1],document.forms['display'],'reportorder')\" class=\"menuitem\">Report Order</a></td> " + 
				"		</tr>"
	}
	strMenu = strMenu +
				"	</table>" + 
				"</div>";
	document.write(strMenu);
}

function buildActionMenu(strClassName, strImgSrc) 
{
	var commands = new Array();
	if(ses.ROLE == TOGA_EXPERT)
	{
		commands[0] = commandsAll['add_unit'];
		commands[1] = commandsAll['add_lab_org'];
		commands[2] = commandsAll['search_expert'];

		commands[3] = commandsAll['add_location'];
		commands[4] = commandsAll['edit_lab_org'];
		commands[5] = commandsAll['view_unit_loc_changes'];

		commands[6] = commandsAll['add_contact'];
		commands[7] = commandsAll['print_export'];
		commands[8] = commandsAll['view_sample_date_changes'];

		commands[9] = commandsAll['cust_org_maint'];
		commands[10] = commandsAll['upload_shipp_recev_fake'];
		commands[11] = commandsAll['approve_sample_results'];

		commands[12] = commandsAll['edit_cust_org'];
		commands[13] = commandsAll['ship_info'];
		//commands[14] = commandsAll['shipping_administration'];

		//commands[15] = commandsAll['return_shipping'];
		//commands[17] = commandsAll['pricing_change'];
		//commands[18] = commandsAll['add_ship_org'];
		//commands[19] = commandsAll['upload_sample_result'];
		//commands[20] = commandsAll['view_quotes'];
		//commands[21] = commandsAll['search'];

		//We will have to renumber these as above once we implement the receiv_info 
		// DSB 6/13/2002
		commands[14] = commandsAll['add_ship_org'];
		//01/12/2007.VH Start
		//commands[15] = commandsAll['upload_sample_result_fake'];
		//commands[16] = commandsAll['search'];
		//commands[17] = commandsAll['receiv_info'];		
		commands[15] = commandsAll['search'];
		commands[16] = commandsAll['receiv_info'];	
		//01/12/2007.VH end
	}
	else if(ses.ROLE == TOGA_ADMINISTRATOR)
	{
		commands[0] = commandsAll['add_unit'];
		commands[1] = commandsAll['upload_sample_result'];
		commands[2] = commandsAll['search_expert'];

		commands[3] = commandsAll['add_location'];
		//commands[4] = commandsAll['edit_lab_org'];
		commands[4] = commandsAll['search'];

		commands[5] = commandsAll['add_contact'];
		commands[6] = commandsAll['print_export'];
		commands[7] = commandsAll['view_unit_loc_changes'];

		commands[8] = commandsAll['cust_org_maint'];
		commands[9] = commandsAll['upload_shipp_recev_fake'];
		commands[10] = commandsAll['view_my_profile'];

		commands[11] = commandsAll['edit_cust_org'];
		commands[12] = commandsAll['ship_info'];
		//commands[14] = commandsAll['shipping_administration'];

		//commands[15] = commandsAll['return_shipping'];
		commands[13] = commandsAll['receiv_info']; 
	}
	else if(ses.ROLE == LAB_SHIPPING_CONTACT)
	{
		commands[0] = commandsAll['view_my_profile']; 
		commands[1] = commandsAll['add_contact'];
		 
		commands[2] = commandsAll['upload_shipp_recev'];
		//commands[3] = commandsAll['upload_sample_result'];
		commands[3] = commandsAll['ship_info'];

		commands[4] = commandsAll['search'];
		commands[5] = commandsAll['receiv_info'];
	}
	else if(ses.ROLE == LAB_BUSINESS_CONTACT)
	{
		commands[0] = commandsAll['view_my_profile']; 
		commands[1] = commandsAll['edit_lab_org'];
		 
		commands[2] = commandsAll['print_export']; 
		commands[3] = commandsAll['add_contact'];
		 
		commands[4] = commandsAll['upload_shipp_recev'];
		commands[5] = commandsAll['ship_info'];

		commands[6] = commandsAll['upload_sample_result'];
		commands[7] = commandsAll['search'];
		commands[8] = commandsAll['receiv_info'];
		commands[9] = commandsAll['upload_lube_sample_result'];//07/05/2006.VH		
	}
	else if(ses.ROLE == ACCOUNT_MANAGER || ses.ROLE == CLIENT)
	{
		commands[0] = commandsAll['view_my_profile'];
		commands[1] = commandsAll['edit_cust_org'];
		 
		commands[2] = commandsAll['add_unit'];
		//commands[3] = commandsAll['return_shipping'];
		 
		commands[3] = commandsAll['add_location'];
		commands[4] = commandsAll['search'];

		commands[5] = commandsAll['add_contact'];
		//commands[7] = commandsAll['edit_lab_org'];
	}
	else if(ses.ROLE == INSURANCE_AGENT)
	{
		commands[0] = commandsAll['view_my_profile'];
		commands[1] = commandsAll['search'];

		//commands[1] = commandsAll['edit_cust_org'];
		 
		//commands[2] = commandsAll['add_unit'];
		//commands[3] = commandsAll['return_shipping'];
		 
		//commands[3] = commandsAll['add_location'];
		//commands[4] = commandsAll['search'];

		//commands[5] = commandsAll['add_contact'];
		//commands[7] = commandsAll['edit_lab_org'];
	}
	else if(ses.ROLE == CLIENT_SHIPPING_CONTACT)
	{ 
		commands[0] = commandsAll['view_my_profile'];
		commands[1] = commandsAll['search'];  
		 
		commands[2] = commandsAll['add_contact'];
		//commands[3] = commandsAll['return_shipping'];
	}

	if(ses.ROLE == TOGA_EXPERT || ses.ROLE == TOGA_ADMINISTRATOR || ses.ROLE == LAB_BUSINESS_CONTACT)
	{
		strMenu = 	"<div onMouseOut=\"hideMenu(currentMenu);try {document.all.stt_orgid.style.width=orgWidth} catch(e){};\" name=\"actionMenu\" id=\"actionMenu\" class=\"" + strClassName + "\">" + 
					"	<img onMouseOut=\"hideMenu(currentMenu);try {document.all.stt_orgid.style.width=orgWidth}catch(e){};\" src=\"" + strImgSrc + "\" width=\"480\" height=\"170\" />"	
	strMenu = strMenu + 
				"</div>" + 
				"<div name=\"actionMenuItems\" id=\"actionMenuItems\" class=\"" + strClassName + "2\">" + 
				"	<table width=\"450\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">"	
		for(var i=0;i<commands.length;++i)
		{
			strMenu = strMenu +
					"		<tr>" + 
					"			<!-- <td width=\"5%\"><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> --> " + 
					"			<td width=\"32%\">" + commands[i] + "</td> "
					if(++i<commands.length)
					{
						strMenu = strMenu + "<td width=\"30%\">" + commands[i] + "</td> " 
					}
					else
					{
						break;
					}
					if(++i<commands.length)
					{
						strMenu = strMenu + "<td width=\"30%\">" + commands[i] + "</td> " 
					}
					else
					{
						break;
					}				
		}		
	}
	else
	{
		strMenu = 	"<div onMouseOut=\"hideMenu(currentMenu);\" name=\"actionMenu\" id=\"actionMenu\" class=\"" + strClassName + "\">" + 
					"	<img onMouseOut=\"hideMenu(currentMenu)\" src=\"" + strImgSrc + "\" />";	
	strMenu = strMenu + 
				"</div>" + 
				"<div name=\"actionMenuItems\" id=\"actionMenuItems\" class=\"" + strClassName + "2\">" + 
				"	<table width=\"230\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">"	
		for(var i=0;i<commands.length;++i)
		{
			strMenu = strMenu +
					"		<tr>" + 
					"			<!-- <td width=\"5%\"><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td> --> " + 
					"			<td width=\"50%\">" + commands[i] + "</td> "
					if(++i<commands.length)
					{

						strMenu = strMenu + "<td width=\"50%\">" + commands[i] + "</td> " 
					}
					else
					{
						break;
					}				
		}
	}

	strMenu = strMenu +	"	</table>" + 
				"</div>";
		
	document.write(strMenu);
}

function showMenu(strMenu) {
	hideMenu(currentMenu);
	strMenuId = strMenu + "Menu";
	strMenuItemsId = strMenu + "MenuItems";
	showDiv(strMenuId);
	showDiv(strMenuItemsId);
	currentMenu=strMenu;
	if (orgName> "")
		eval("document.all." + orgName + ".style.width='280px';");
}
function hideMenu(strMenu) {
	if(strMenu=="") return;
	strMenuId = strMenu + "Menu";
	strMenuItemsId = strMenu + "MenuItems";
	hideDiv(strMenuId);
	hideDiv(strMenuItemsId);
	if (orgName> "")
		eval("document.all." + orgName + ".style.width=orgWidth;");
}

function showDiv(strDiv) {
	// if nested divs, use the arguments property for netscape
	if(NS) {
		var sEval="";
		var nbrArgs = showDiv.arguments.length;
		for(var i=nbrArgs; i>0 ;i--) {
				sEval += "document.layers[\"" + showDiv.arguments[i-1] + "\"].";
		}
		sEval += "visibility=\"show\"";
		eval(sEval);
	} else if(NS6) {
		document.getElementById(strDiv).style.visibility="visible";
	} else {
		document.all[strDiv].style.visibility="visible";
	}
}
function hideDiv(strDiv) {
	// if nested divs, use the arguments property for netscape
	if(NS) {
		var sEval="";
		var nbrArgs = hideDiv.arguments.length;
		for(var i=nbrArgs; i>0 ;i--) {
				sEval += "document.layers[\"" + hideDiv.arguments[i-1] + "\"].";
		}
		sEval += "visibility=\"hide\"";
		eval(sEval);
	} else if(NS6) {
		document.getElementById(strDiv).style.visibility="hidden";
	} else {
		document.all[strDiv].style.visibility="hidden";
	}
}


function openMenuWindow(url) {
	window.open(url,"menu","width=800,height=600,menubar=yes,toolbar=yes,resizable=yes");
}

function pgMouseOver(target, evt) {
	document.routeEvent(evt);
}
function pgMouseOut(target, evt) {
	document.routeEvent(evt);
}

function fGo(page)
{
	var ls='toolbar=0,location=0,directories=0,status=0,menubar=1,right=0,top=0,width=750,height=500,scrollbars=1,resizable=1';
	window.open('staticPg.asp?var='+page,'TOGA',ls,1);
}