function hilite(vtd)
{    
	if (vtd.aselected=="true")
	{
		return false;
	}
	else
	{
	vtd.style.backgroundColor = '#D17666';
	vtd.bgColor = '#D17666';
	vtd.style.color = '#FFFFFF';
	vtd.style.cursor = 'hand';
	vtd.style.cursor = 'pointer';
	}

}

function aselect(vtd,items)
{
	if (document.getElementById) oCtrl = document.getElementById(vtd.id)
	else oCtrl = document.all.vtd;  
	if (oCtrl)
	{	
		oCtrl.aselected="true";
		oCtrl.style.backgroundColor = '#B21A00';
		oCtrl.bgColor = '#B21A00';
		oCtrl.style.color = '#FFFFFF';
		

		var optd;
		for (var i=1; i<items; i++)
		{
			if (document.getElementById)
				optd=document.getElementById("menu" + i);
			else
				optd=document.all("menu"+i);	
			if (optd)
			{
				if (optd!=oCtrl)
				{
					optd.aselected="false";
					lolite(optd);
				}
			}
			else
			{
				if (document.getElementById)
					optd=document.getElementById("LeftMenu_Broker_Secure_menu" + i);
				else
					optd=document.all("LeftMenu_Broker_Secure_menu"+i);	
				if (optd)
				{
					if (optd!=oCtrl)
					{
						optd.aselected="false";
						lolite(optd);
					}
				}
				else
				{
					if (document.getElementById)
						optd=document.getElementById("LeftMenu_Broker_Secure1_menu" + i);
					else
						optd=document.all("LeftMenu_Broker_Secure1_menu"+i);	
					if (optd)
					{
						if (optd!=oCtrl)
						{
							optd.aselected="false";
							lolite(optd);
						}
					}
				}
			}
		}	
	}	
}

function lolite(vtd)
{    
	if (vtd.aselected=="true")
	{
		return;
	}
	vtd.style.backgroundColor = '#F7E8E5';
	vtd.bgColor = '#F7E8E5';
	vtd.style.color = '#B21A00';
	

}


// ************************



function aselectlumley(vtd,items)
{
	vtd.aselected="true";
	vtd.style.backgroundColor = '#90404E';
	vtd.bgColor = '#90404E';
	vtd.style.color = '#FFFFFF';
	

	var optd;
	
	for (var i=1; i<items; i++)
	{
		if (document.getElementById)
			optd=document.getElementById("menu" + i);
		else
			optd=document.all("menu"+i);
		
		if (optd!=vtd)
		{
			optd.aselected="false";
			lolitelumley(optd);
		}
	}
			
}

function hilitelumley(vtd)
{    
	if (vtd.aselected=="true")
	{
		return false;
	}
	else
	{
	vtd.style.backgroundColor = '#90404E';
	vtd.bgColor = '#90404E';
	vtd.style.color = '#FFFFFF';
	vtd.style.cursor = 'hand';
	vtd.style.cursor = 'pointer';
	}

}

function lolitelumley(vtd)
{    
	if (vtd.aselected=="true")
	{
		return;
	}
	vtd.style.backgroundColor = '#EFD1CC';
	vtd.bgColor = '#EFD1CC';
	vtd.style.color = '#6B0013';
	

}


// *************************

function subhilite(vtd)
{    
	if (vtd.aselected=="true")
	{
		return false;
	}
	else
	{
	vtd.style.backgroundColor = '#E8BAB2';
	vtd.bgColor = '#E8BAB2';
	vtd.style.color = '#FFFFFF';
	vtd.style.cursor = 'hand';
	vtd.style.cursor = 'pointer';
	//submenu arrow 
	var img
	img = vtd.id + '_arrow'
	document.images[img].src = 'images/submenu_arrow_over.gif'; 
	}

}

function subaselect(vtd,items)
{
	vtd.aselected="true";
	vtd.style.backgroundColor = '#D17666';
	vtd.bgColor = '#D17666';
	vtd.style.color = '#FFFFFF';
	var img
	img = vtd.id + '_arrow'
	document.images[img].src = 'images/submenu_arrow_over.gif'; 

	var optd;
	
	for (var i=1; i<items; i++)
	{
		if (document.getElementById)
			optd=document.getElementById("submenu" + i);
		else
			optd=document.all("submenu"+i);
		
		if (optd!=vtd)
		{
			optd.aselected="false";
			sublolite(optd);
		}
	}
			
}

function sublolite(vtd)
{    
	if (vtd.aselected=="true")
	{
		return;
	}
	vtd.style.backgroundColor = '#FBF3F2';
	vtd.bgColor = '#FBF3F2';
	vtd.style.color = '#666666';
	var img
	img = vtd.id + '_arrow'
	document.images[img].src = 'images/submenu_arrow.gif'; 

}

function subhilitebroker(vtd)
{    
	if (vtd.aselected=="true")
	{
		return false;
	}
	else
	{
	vtd.style.backgroundColor = '#E8BAB2';
	vtd.bgColor = '#E8BAB2';
	vtd.style.color = '#FFFFFF';
	vtd.style.cursor = 'hand';
	vtd.style.cursor = 'pointer';
	//submenu arrow 
	var img
	img = vtd.id + '_arrow'
	document.images[img].src = 'images/submenu_arrow_over.gif'; 
	}

}

function subaselectbroker(vtd,items)
{
	vtd.aselected="true";
	vtd.style.backgroundColor = '#D17666';
	vtd.bgColor = '#D17666';
	vtd.style.color = '#FFFFFF';
	var img
	img = vtd.id + '_arrow'
	document.images[img].src = 'images/submenu_arrow_over.gif'; 

	var optd;
	
	for (var i=1; i<items; i++)
	{
		if (document.getElementById)
			optd=document.getElementById("submenu" + i);
		else
			optd=document.all("submenu"+i);
		
		if (optd!=vtd)
		{
			optd.aselected="false";
			sublolitebroker(optd);
		}
	}
			
}

function sublolitebroker(vtd)
{    
	if (vtd.aselected=="true")
	{
		return;
	}
	vtd.style.backgroundColor = '#FBF3F2';
	vtd.bgColor = '#FBF3F2';
	vtd.style.color = '#666666';
	var img
	img = vtd.id + '_arrow'
	document.images[img].src = 'images/submenu_arrow.gif'; 

}

function goTo(goPage)
{
	window.location = goPage;
}
function goToNew(goPage)
{
	window.open(goPage);
	//window.location = goPage;
}

function goTox(goPage)
{
	return false;
}

function show(div,items)
{
	//alert(div);
	div.style.display = 'block';
	var otherdiv;
	for (var i=1; i<items; i++)
	{
		if (document.getElementById)
		{
			if (div.id.substring(0,2) == "dd")
			{
				otherdiv=document.getElementById("ddiv" + i);
				if (document.getElementById("adiv1")) hide(document.getElementById("adiv1"));
			}
			else if (div.id.substring(0,2)== "cd")
			{
				otherdiv=document.getElementById("cdiv" + i);
				if (document.getElementById("adiv1")) hide(document.getElementById("adiv1"));
			}
			else if (div.id.substring(0,2)== "ad")
			{
				otherdiv=document.getElementById("adiv" + i);
				if (document.getElementById("ddiv1")) hide(document.getElementById("ddiv1"));
				if (document.getElementById("cdiv1")) hide(document.getElementById("cdiv1"));			
			}		
			else otherdiv=document.getElementById("div" + i);
		}
		else
		{
			if (div.id.substring(0,2) == "cd")
			{
				otherdiv=document.all("cdiv"+i);
				if (document.all("adiv1")) hide(document.all("adiv1"));
			}
			else if (div.id.substring(0,2) == "dd")
			{
				otherdiv=document.all("ddiv"+i);
				if (document.all("ddiv1")) hide(document.all("ddiv1"));
			}
			else if (div.id.substring(0,2) == "ad")
			{
				otherdiv=document.all("adiv"+i);
				if (document.all("ddiv1")) hide(document.all("ddiv1"));
				if (document.all("cdiv1")) hide(document.all("cdiv1"));
			}
			else otherdiv=document.all("div"+i);
		}
		if (otherdiv)
		{
			if (otherdiv!=div)
			{
				otherdiv.aselected="false";
				hide(otherdiv);
			}
		}
	}
}


function hide(div)
{    
	div.style.display = 'none';
}

function imgOver(img)
{
	img.src = 'images/' + img.name + '_over.gif'; img.style.cursor = 'hand'; img.style.cursor = 'pointer';
}	
function imgOut(img)
{
	if (img.aselected == "true")
		return false;
	else
	img.src = 'images/' + img.name + '.gif'; img.style.cursor = 'default'; img.style.cursor = 'default';
}

function imgOverJpg(img)
{
	img.src = 'images/' + img.name + '_over.jpg'; img.style.cursor = 'hand'; img.style.cursor = 'pointer';
}	
function imgOutJpg(img)
{
	img.src = 'images/' + img.name + '.jpg'; img.style.cursor = 'default'; img.style.cursor = 'default';
}

function imgOverx(img)
{
	return false;
}	
function imgOutx(img)
{
	return false;
}

function imgOverAbs(img)
{
	img.src = 'images/' + img.name + '_over.gif'; img.style.cursor = 'hand'; img.style.cursor = 'pointer';
}	
function imgOutAbs(img)
{
	img.src = 'images/' + img.name + '.gif'; img.style.cursor = 'default'; img.style.cursor = 'default';
}

function winopen(win,name,size)
{
	window.open(win,name,'top=10,left=10,'+ size +',scrollbars=yes,resizable=yes');
}

//function infowin(info, broker){ 
//window.open("/infowin.html?info=" + info + "&broker=" + broker, "infowin", "top=10,left=10,height=420,width=420,status=no,scrollbars=auto");
//}

function infowin(info){ 
window.open("infowin.html?info=" +info, "infowin", "top=10,left=10,height=420,width=420,status=no,scrollbars=auto");
}
function infowin2(info){ 
window.open("infowin2.html?info=" +info, "infowin", "top=10,left=10,height=420,width=420,status=no,scrollbars=auto");
}
function infowin3(){ 
win = window.open('infowin3.html','infowin3','top=10,left=10,height=500,width=420,status=no,scrollbars=auto');
}

function RunCalculation(iNoOfRows)
{
	var iTotal = 0;
	var iCount = 0;
//	oCtrl1Year = document.getElementById("BuyingProcessPriceGrid1_rdo1Year");
//	oCtrl5Years = document.getElementById("BuyingProcessPriceGrid1_rdo5Years");
//	oCtrl10Years = document.getElementById("BuyingProcessPriceGrid1_rdo10Years");	
	bHomeOnly = "False";
	bVehicleOnly = "False";

	for (i=1; i<= iNoOfRows; i++)
	{
		if (document.getElementById("BuyingProcessPriceGrid1_row" + i))
		{
			if (document.getElementById("BuyingProcessPriceGrid1_chk" + i).checked)
			{
				document.getElementById("BuyingProcessPriceGrid1_tdProduct" + i).className = "tablecellredselected";
				document.getElementById("BuyingProcessPriceGrid1_tdProductTitle" + i).className = "tablecellredselected";
				document.getElementById("BuyingProcessPriceGrid1_tdGif" + i).className = "tablecellredselected";
				document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "1Year").className = "tablecellblackselected";		
//				if (oCtrl1Year.checked) document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "1Year").className = "tablecellblackselected";
//				else document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "1Year").className = "tablecellblack";
//				if (oCtrl5Years.checked) document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "5Year").className = "tablecellblackselected";
//				else document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "5Year").className = "tablecellblack";
//				if (oCtrl10Years.checked) document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "10Year").className = "tablecellblackselected";
//				else document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "10Year").className = "tablecellblack";
								
				if (document.getElementById("BuyingProcessPriceGrid1_lblProduct" + i).innerHTML.indexOf("POSSESSIONS Coding") != -1) bHomeOnly = "True";
				else if (document.getElementById("BuyingProcessPriceGrid1_lblProduct" + i).innerHTML.indexOf("PRIVATE VEHICLE Coding") != -1) bVehicleOnly = "True";
			}
			else{
				document.getElementById("BuyingProcessPriceGrid1_tdProduct" + i).className = "tablecellred";
				document.getElementById("BuyingProcessPriceGrid1_tdProductTitle" + i).className = "tablecellred";
				document.getElementById("BuyingProcessPriceGrid1_tdGif" + i).className = "tablecellred";
				document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "1Year").className = "tablecellblack";
//				document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "5Year").className = "tablecellblack";
//				document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "10Year").className = "tablecellblack";
			}
		}
	}
	if (bHomeOnly == "True" && bVehicleOnly == "True") alert("You have selected Home Only coding and Vehicle Only Coding.  The Home & Vehicle Coding system may be cheaper");
//	if (oCtrl1Year.checked || oCtrl5Years.checked || oCtrl10Years.checked)
//	if (oCtrl1Year.checked)
//	{
		for (i=1; i<= iNoOfRows; i++)
		{
			if (document.getElementById("BuyingProcessPriceGrid1_row" + i))
			{
				//if (document.getElementById("BuyingProcessPriceGrid1_chk" + i).checked && oCtrl1Year.checked)
				if (document.getElementById("BuyingProcessPriceGrid1_chk" + i).checked)
				{
					sTestString = document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "1Year").innerHTML;
					iTotal = parseFloat(iTotal) + parseFloat(removeCommas(sTestString));
				}
//				if (document.getElementById("BuyingProcessPriceGrid1_chk" + i).checked && oCtrl5Years.checked)
//				{
//					sTestString = document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "5Year").innerHTML;
//					iTotal = iTotal + removeCommas(sTestString);
//				}	
//				if (document.getElementById("BuyingProcessPriceGrid1_chk" + i).checked && oCtrl10Years.checked)
//				{
//					sTestString = document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "10Year").innerHTML;
//					iTotal = iTotal + removeCommas(sTestString);
//				}
			}
//		}
		iTotal = Math.round(iTotal * 100) / 100;
		if (iTotal == 0) iTotal = "0.00";
		sTotal = addCommas(iTotal);
		if (sTotal.substring(sTotal.length-2, sTotal.length-1) == ".") sTotal += "0";
//		if (oCtrl1Year.checked == true) 
//		{
			document.getElementById("BuyingProcessPriceGrid1_lbl1YearPrice").innerHTML = "&pound;" + sTotal;
//			document.getElementById("BuyingProcessPriceGrid1_lbl5YearPrice").innerHTML = "&pound;0.00";
//			document.getElementById("BuyingProcessPriceGrid1_lbl10YearPrice").innerHTML = "&pound;0.00";
//		}
//		if (oCtrl5Years.checked == true)
//		{
//			document.getElementById("BuyingProcessPriceGrid1_lbl1YearPrice").innerHTML = "&pound;0.00";
//			document.getElementById("BuyingProcessPriceGrid1_lbl5YearPrice").innerHTML = "&pound;" + sTotal;
//			document.getElementById("BuyingProcessPriceGrid1_lbl10YearPrice").innerHTML = "&pound;0.00";
//		}
//		if (oCtrl10Years.checked == true)
//		{
//			document.getElementById("BuyingProcessPriceGrid1_lbl1YearPrice").innerHTML = "&pound;0.00";
//			document.getElementById("BuyingProcessPriceGrid1_lbl5YearPrice").innerHTML = "&pound;0.00";
//			document.getElementById("BuyingProcessPriceGrid1_lbl10YearPrice").innerHTML = "&pound;" + sTotal;
//		}
	}
}

function RunCalculationAcc(iNoOfRows)
{
	var iTotal = 0;
	var iCount = 0;
	for (i=1; i<= iNoOfRows; i++)
	{
		if (document.getElementById("BuyingProcessPriceGrid1_rowAcc" + i))
		{
			if (document.getElementById("BuyingProcessPriceGrid1_chkAcc" + i).checked)
			{
				document.getElementById("BuyingProcessPriceGrid1_tdProductAcc" + i).className = "tablecellredselected";
				document.getElementById("BuyingProcessPriceGrid1_tdProductTitleAcc" + i).className = "tablecellredselected";
				document.getElementById("BuyingProcessPriceGrid1_tdGifAcc" + i).className = "tablecellredselected";
				document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "1YearAcc").className = "tablecellblackselected";						
			}
			else{
				document.getElementById("BuyingProcessPriceGrid1_tdProductAcc" + i).className = "tablecellred";
				document.getElementById("BuyingProcessPriceGrid1_tdProductTitleAcc" + i).className = "tablecellred";
				document.getElementById("BuyingProcessPriceGrid1_tdGifAcc" + i).className = "tablecellred";
				document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "1YearAcc").className = "tablecellblack";
			}
		}
	}
	for (i=1; i<= iNoOfRows; i++)
	{
		if (document.getElementById("BuyingProcessPriceGrid1_rowAcc" + i))
		{
			if (document.getElementById("BuyingProcessPriceGrid1_chkAcc" + i).checked)
			{
				sTestString = document.getElementById("BuyingProcessPriceGrid1_lblrow" + i + "1YearAcc").innerHTML;
				iTotal = parseFloat(iTotal) + parseFloat(removeCommas(sTestString));
			}
		}
		iTotal = Math.round(iTotal * 100) / 100;
		if (iTotal == 0) iTotal = "0.00";
		sTotal = addCommas(iTotal);
		if (sTotal.substring(sTotal.length-2, sTotal.length-1) == ".") sTotal += "0";
		document.getElementById("BuyingProcessPriceGrid1_lbl1YearPriceAcc").innerHTML = "&pound;" + sTotal;
	}
}


function removeCommas(sTestString)
{
	sTestString = sTestString.substring(1, sTestString.length);
	iCommaPosition = sTestString.indexOf(',');
	if (iCommaPosition == -1) sPriceString = sTestString;
	else sPriceString = sTestString.substring(0, iCommaPosition) + sTestString.substring(iCommaPosition+1, sTestString.Length);
	while(iCommaPosition > 0)
	{
		sTestString = sPriceString;
		iCommaPosition = sTestString.indexOf(',');
		if (iCommaPosition == -1) break;
		sPriceString = sTestString.substring(0, iCommaPosition) + sTestString.substring(iCommaPosition+1, sTestString.Length);
	}
	iTotal = parseFloat(sPriceString);
	return iTotal;
}
	
function addCommas(iTotal)
{
	sFullTotal = new String(iTotal);
	if (sFullTotal.indexOf(".") != -1)
	{
		sTotalInt = sFullTotal.substring(0, sFullTotal.indexOf('.'));
		sPence = sFullTotal.substring(sFullTotal.indexOf("."), sFullTotal.length);	
	}
	else
	{
		sTotalInt = sFullTotal;
		sPence = ".00";
	}
	bTest = true;
	var sTempString;
	while(bTest = true)
	{
		iStringLength = sTotalInt.length;
		if (iStringLength < 4 ) 
		{
			if (sTempString == null) sTempString = sTotalInt;
			else sTempString = sTotalInt + "," + sTempString;
			bTest = false;
			break;
		}
		else
		{
			if (sTempString == null) sTempString = sTotalInt.substring(iStringLength-3,iStringLength);
			else sTempString = sTotalInt.substring(iStringLength-3,iStringLength) + "," + sTempString;
			sTotalInt = sTotalInt.substring(0,iStringLength-3);
		}
	}
	 sTotal = sTempString + sPence;	
	return sTotal;
}

function FillDeliveryAddress()
{
	if (document.getElementById) 
	{
		oBillAddress1 = document.getElementById("txtBillAddress1");
		oBillAddress2 = document.getElementById("txtBillAddress2");
		oBillAddress3 = document.getElementById("txtBillAddress3");
		oBillTown = document.getElementById("txtBillTown");
		oBillCounty = document.getElementById("txtBillCounty");
		oBillPostcode = document.getElementById("txtBillPostcode");
		oAddress1 = document.getElementById("txtAddress1");
		oAddress2 = document.getElementById("txtAddress2");
		oAddress3 = document.getElementById("txtAddress3");
		oTown = document.getElementById("txtTown");
		oCounty = document.getElementById("txtCounty");
		oPostcode = document.getElementById("txtPostcode");
	}
	else
	{
		oBillAddress1 = document.all.txtBillAddress1;
		oBillAddress2 = document.all.txtBillAddress2;
		oBillAddress3 = document.all.txtBillAddress3;
		oBillTown = document.all.txtBillTown;
		oBillCounty = document.all.txtBillCounty;
		oBillPostcode = document.all.txtBillPostcode;
		oAddress1 = document.all.txtAddress1;
		oAddress2 = document.all.txtAddress2;
		oAddress3 = document.all.txtAddress3;
		oTown = document.all.txtTown;
		oCounty = document.all.txtCounty;
		oPostcode = document.all.txtPostcode;
	}
	oAddress1.value = oBillAddress1.value;
	oAddress2.value = oBillAddress2.value;
	oAddress3.value = oBillAddress3.value;
	oTown.value = oBillTown.value;
	oCounty.value = oBillCounty.value;
	oPostcode.value = oBillPostcode.value;
}

function UpdateClass(ctrl, sClassTo)
{
	if (ctrl.className != "tablecellblackselected") ctrl.className = sClassTo;
}

function UpdateClassReport(ctrl, sClassTo)
{
	ctrl.className = sClassTo;
}

function clearForm(ctrl)
{
	ctrl.reset();
}

function getEmailFields()
{
	document.form1.hidsFrom.value = window.opener.document.form1.hidsFrom.value;
	document.form1.hidsSubject.value = window.opener.document.form1.hidsSubject.value;	
	document.form1.hidsBody.value = window.opener.document.form1.hidsBody.value;	
}

// Enables text boxes when changed to change the default button on the page
// See SetDefaultButton method in code behind to see how you attach the button
function fnTrapKD(btn, event){
	if (document.all){
		if (event.keyCode == 13){
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		}
	}
	else if (document.getElementById){
		if (event.which == 13){
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		}
	}
	else if(document.layers){
		if(event.which == 13){
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		}
	}
}

function disableButton(theButton)
{
	theButton.value="Please wait";
	theButton.disabled = true;
	document.forms[0].submit();
}

function setSessionText(obj,txtObj, row)
{
	objTextbox = document.getElementById("gridLog:_ctl" + row + ":" + txtObj);
	objTextbox.value = obj.value;
}

function dispConfirm()
{
	var result = confirm("Are you sure you want to run the month end?");
	return result;
}

function reportConfirm()
{
	var result = confirm("Are you sure?");
	return result;
}

function renewalwin()
{
	if (document.getElementById('BuyingProcessDetailsForm1_chkRenewal').checked==false){
	return infowin3();
	}
	
	if (document.getElementById('BuyingProcessDetailsForm1_chkRenewal').checked==true)
	{
	//alert('hello');
	win.close();
	}
}

function imgOverRel(img)
{
	img.src = 'images/' + img.name + '_over.gif'; img.style.cursor = 'hand'; img.style.cursor = 'pointer';
}	
function imgOutRel(img)
{
	img.src = 'images/' + img.name + '.gif'; img.style.cursor = 'default'; img.style.cursor = 'default';
}

function wlnavHilite(wlnav)
{
	wlnav.className = 'wlnav_on';
}

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();
}
MM_reloadPage(true);

function expandCollapse() {
	for (var i=0; i<expandCollapse.arguments.length; i++) {
		var element = document.getElementById(expandCollapse.arguments[i]);
		element.style.display = (element.style.display == "none") ? "block" : "none";
	}
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
