function getEnviron() {	var testloc = document.URL.lastIndexOf("www.");
	var testloc2 = document.URL.lastIndexOf("secure.");
	this.env = "";	if (testloc < 0 && testloc2 <0) {	var test = document.URL;	var t = document.URL.indexOf("te");	var dot = document.URL.indexOf(".");	var tenv = test.substring(t,dot);	this.env = tenv;	}	return this.env;}
function getDomain() {	var loc = document.domain;	var sec = document.URL.lastIndexOf("secure");	getEnviron();	var len = loc.length;	var len1 = this.env.length; 	if (sec >0) {		len1 = len1 + 7;	} else {		len1 = len1 + 4;	}		this.addr = loc.substring(len1,len);	return this.addr}
function displayEnviron() {	getEnviron();	getDomain();	alert("Environment&#58; " + this.env + "\n\n Domain&#58; " + this.addr);}
function generateSecureURL(file) {	getEnviron();	getDomain();	var newURL = "https://secure" + this.env + "." + this.addr + file;	window.location.href = newURL;
}
function generateURL(file) {	getEnviron();	getDomain();	var newURL = "http://www" + this.env + "." + this.addr + file;	window.location.href = newURL;
}
