	function sendNow() {
		var url = document.URL;
		url = url.substring(url.indexOf("/instantApps/"));
		showWindow("/reports/address4send.asp?lostsession=1&thisPage=" + url, 600,650);
	}

	function refreshIt() {
		pageTimeOut = setTimeout("document.getElementById('Form1').submit()",30000);
		newHeight = document.getElementById("mngrBody").offsetHeight + 25;
		newWidth = document.getElementById("mngrBody").offsetWidth + 10;				
		window.parent.resizeManagerFrame(newHeight,newWidth);
	}
		
	function showWindow(address, height, width)
	{
		var thisWindow="";
		thisWindow=window.open(address,"thisWindow","toolbar=yes,location=0,directories=no,status=no,menubar=0,scrollbars=yes,resizable=yes,screenX=0,width=" + width + ",height=" + height);
		thisWindow.focus();
	}
	
	
	function openInstant(testtype, id, type, account_id, employee_id, isPod) {
		var windowCnt = window.parent.windowCnt();
		var offset = windowCnt * 20;		
		//if (testtype == "HTTP" || isPod.toUpperCase() == "TRUE") {       // modified by yli 081006
		if (testtype == "HTTP" || (isPod.toUpperCase() == "TRUE" && type == "HTTP")) {
		    height = window.screen.availHeight - 50 - offset;
		    width = window.screen.availWidth - offset;
		    address = "instantTest.aspx";
		}
		else if (isPod.toUpperCase() == "TRUE" && type == "Trace Route") {
		    height = 500;
		    width = 700;
		    address = "TOD.aspx";
		}
		else if (isPod.toUpperCase() == "TRUE" && (type == "Ping" || type == "Dig" || type == "NS Lookup")) {
		    height = 500;
		    width = 700;
		    address = "LMUtilResults.aspx";
		}
		
		else {
		    switch (testtype.toUpperCase()) {
		        case "DIG":
		        case "(MS) PING":
		        case "(MS) TRACE ROUTE":
		        case "TCP TRACE":
		            height = 500;
		            width = 700;
		            address = "utilityresults.aspx";
		            break;
		        default:
		            height = 500;
		            width = 700;
		            address = "pingtracens.aspx";
		    }
		}
	
		if (isPod.toUpperCase() == "TRUE")
			address += "?pod=" + id+"&type="+type;
		else
			address += "?session_id=" + id;
		address += "&account_id=" + account_id + "&employee_id=" + employee_id;
		
		var instantWindow = "";
		instantWindow = window.open(address,"instantWindow" + windowCnt,"toolbar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=yes,menubar=no,left=" + offset + ",top=" + offset + ",screenX=" + offset + ",screenY=" + offset + ",height=" + height + ",width=" + width);
		instantWindow.focus();
		
		window.parent.addWindowReference(instantWindow);
	}

	function openSCOE(pod_id) {
		var windowCnt = window.parent.windowCnt();
		var offset = windowCnt * 20;
		height = window.screen.availHeight - 50 - offset;
	    width = window.screen.availWidth - offset;
	    address = "/LastMile/Mobile/SCoE.asp";
		address += "?pod_id=" + pod_id;
		var instantSCOEWindow = "";
		instantSCOEWindow = window.open(address,"instantSCOEWindow" + windowCnt,"toolbar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=yes,menubar=no,left=" + offset + ",top=" + offset + ",screenX=" + offset + ",screenY=" + offset + ",height=" + height + ",width=" + width);
		instantSCOEWindow.focus();
		
		window.parent.addWindowReference(instantSCOEWindow);
	}

