function uploadWindow(l_id, l_meeting) {
	var testwindow = window.open("uploadImage.html?id="+l_id+"&meeting="+l_meeting, "mywindow", "location=0,status=1,scrollbars=0,width=580,height=130");
	testwindow.moveTo(0, 0);
	if (testwindow) {
		testwindow.focus();
	}
}
function sendToHTTPS() {
	var currentURL = document.URL;
	var forwardSubdomain = "com.greenjobinterview";
	if (currentURL.substr(0, 8) != "https://") {
		arURL = currentURL.split("//", 2);
		arsubdomain = arURL[1].split("/");
		arsubdomain = arsubdomain[0].split(".");
		if (arsubdomain[arsubdomain.length-1]+"."+arsubdomain[arsubdomain.length-2] == forwardSubdomain) {
			location.replace("https://"+arURL[1]);
		}
	}
}
function writeStage(docName) {
	var myQueryString = document.location.search;
	var currentURL = document.URL;
	ardomain = currentURL.split("//");
	arsubdomain = ardomain[1].split("/");
	subfolderText = "";
	for (i=1; i<arsubdomain.length; i++) {
		//Exclude the last folder
		if (i != arsubdomain.length-1) {
			subfolderText += "/"+arsubdomain[i];
		}
	}
	httpDomain = arsubdomain[0]+subfolderText;
	httpProtocol = ardomain[0];
	// remove the '?' sign if exists
	if (myQueryString[0]='?') {
		myQueryString = myQueryString.substr(1, myQueryString.length-1);
	}
	if (myQueryString != "") {
		myQueryString = myQueryString+"&";
	}
	myQueryString = myQueryString+"httpDomain="+httpDomain+"&httpProtocol="+httpProtocol;	
	//Output the flash object 
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" type="application/x-shockwave-flash" data="'+docName+'" width="100%" height="100%" id="meetingloader">\n'+
		'   <param name="movie" value="'+docName+'" />\n'+
		'   <param name="quality" value="best" />\n'+
		'   <param name="allowScriptAccess" value="always" />\n'+
		'   <param name="allowFullScreen" value="true" />\n'+
		'   <param name="salign" value="lt" />\n'+
		'   <param name="flashvars" value="'+myQueryString+'" />\n'+
		'   <EMBED type="application/x-shockwave-flash" src="'+docName+'" name="meetingloader" width=100% height=100% quality="best" allowScriptAccess="always" allowFullScreen="true" salign="lt" flashvars="'+myQueryString+'" pluginspage="https://www.macromedia.com/go/getflashplayer" />\n'+
		'</object>');
}