// setup task/help text arrays
var taskdefault="The information below is required to setup your account. We will never use your personal information for any purpose other that to contact you about this service and for update notices. We use an online processing system called PayPal. When you have filled out the information below and click submit button, you will be taken to PayPal to enter your purchasing information."
var tasktext1 = new Array (
	"Enter a User ID. This ID should be lower case, and contain only numbers and letters with NO spaces. This ID will be used to identify your account and in the address for your site on the web. This field is required.",
	"Enter your Email address. The Email address is how we will contact you about your account. This field is required.",
	"Enter your account password. The password should be lower case, and contain only numbers and letters with NO spaces. Use at least six characters. This field is required.",
	"Enter your account First Name. This field is required.",
	"Enter your account Last Name. This field is required.",
	"Enter your account residence address line #1. This field is required.",
	"Enter your account residence address line #2. This field is optional.",
	"Enter your account residence city. This field is required.",
	"Enter your account residence state or provence. This field is required.",
	"Enter your account residence zip code. This field is required.",
	"Enter your account residence phone number. This field is optional.",
	"Enter the quantity of time to purchase for your site. This field is required."
);
if (document.images) {
  epihostnav_r1_c1_f2 = new Image(140 ,24); epihostnav_r1_c1_f2.src = "images/epihostnav_r1_c1_f2.gif";
  epihostnav_r1_c1_f1 = new Image(140 ,24); epihostnav_r1_c1_f1.src = "images/epihostnav_r1_c1.gif";
  epihostnav_r3_c1_f2 = new Image(140 ,24); epihostnav_r3_c1_f2.src = "images/epihostnav_r3_c1_f2.gif";
  epihostnav_r3_c1_f1 = new Image(140 ,24); epihostnav_r3_c1_f1.src = "images/epihostnav_r3_c1.gif";
  epihostnav_r5_c1_f2 = new Image(140 ,24); epihostnav_r5_c1_f2.src = "images/epihostnav_r5_c1_f2.gif";
  epihostnav_r5_c1_f1 = new Image(140 ,24); epihostnav_r5_c1_f1.src = "images/epihostnav_r5_c1.gif";
  epihostnav_r7_c1_f2 = new Image(140 ,24); epihostnav_r7_c1_f2.src = "images/epihostnav_r7_c1_f2.gif";
  epihostnav_r7_c1_f1 = new Image(140 ,24); epihostnav_r7_c1_f1.src = "images/epihostnav_r7_c1.gif";
  epihostnav_r9_c1_f2 = new Image(140 ,24); epihostnav_r9_c1_f2.src = "images/epihostnav_r9_c1_f2.gif";
  epihostnav_r9_c1_f1 = new Image(140 ,24); epihostnav_r9_c1_f1.src = "images/epihostnav_r9_c1.gif";
  epihostnav_r11_c1_f2 = new Image(140 ,24); epihostnav_r11_c1_f2.src = "images/epihostnav_r11_c1_f2.gif";
  epihostnav_r11_c1_f1 = new Image(140 ,24); epihostnav_r11_c1_f1.src = "images/epihostnav_r11_c1.gif";
  epihostnav_r13_c1_f2 = new Image(140 ,24); epihostnav_r13_c1_f2.src = "images/epihostnav_r13_c1_f2.gif";
  epihostnav_r13_c1_f1 = new Image(140 ,24); epihostnav_r13_c1_f1.src = "images/epihostnav_r13_c1.gif";
  epihostnav_r15_c1_f2 = new Image(140 ,24); epihostnav_r15_c1_f2.src = "images/epihostnav_r15_c1_f2.gif";
  epihostnav_r15_c1_f1 = new Image(140 ,24); epihostnav_r15_c1_f1.src = "images/epihostnav_r15_c1.gif";
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function adjust_task(pnum) {
	// set task text
	var parray=eval("tasktext1");
	var contentiframe=document.getElementById("contentiframe");
	var ptext=taskdefault;
	if(pnum != -1)
		ptext=parray[pnum];
	if(contentiframe != null) {
		if(contentiframe.contentDocument != null) {
			contentiframe.contentDocument.getElementById("tasktext").innerHTML=ptext;
		}
		else if(contentiframe.contentWindow != null) {
			contentiframe.contentWindow.document.getElementById("tasktext").innerHTML=ptext;
		}
	}
}
function page_load() {
	// load content template
	var contentiframe=document.getElementById("contentiframe");
	if(contentiframe != null)
		select_content(1);
	// retry
	else
		setTimeout("page_load()", 500);
}
// reposition page elements
function reposition_elements() {
	// get client sizes
	var pHeight;
	if(window.innerHeight != null)
		pHeight=window.innerHeight;
	else
		pHeight=window.document.body.offsetHeight;
	if(pHeight < 400)
		pHeight=400;
	// resize content element
	var cHeight=0;
	var vHeight=document.getElementById("headercontainer");
	if(vHeight != null)
		cHeight+=vHeight.offsetHeight;
	var contentiframe=document.getElementById("contentiframe");
	if(contentiframe != null) {
		contentiframe.height=pHeight-cHeight-gHeightPad;
	}
}
function setglasstop()
{
	var vElement=document.getElementById("glasstop");
	vElement.style.display="block";
}
function removeglasstop()
{
	var vElement=document.getElementById("glasstop");
	vElement.style.display="none";
	vElement.style.height=document.body.scrollHeight;
}
function clear_selected() {
	if(document.selection != null)
		document.selection.empty();	
	else {
		var selobj=window.getSelection();
		if(selobj != null) {
			var oneRange;
			for(var i=0; i < selobj.rangeCount; i++) {
				oneRange=selobj.getRangeAt(i);
				selobj.removeRange(oneRange);
			}
		}
	}
}
function select_content(cnum) {
	var vsrc="", vhead="";
	if(cnum==1) {
		vsrc="home.cfm";
		vhead="Welcome";
	}
	else if(cnum==2) {
		vsrc="features.cfm";
		vhead="Features";
	}
	else if(cnum==3) {
		vsrc="faq.cfm";
		vhead="FAQs";
	}
	else if(cnum==4) {
		if(gBetaTest)
			vsrc="blogin.cfm";
		else
			vsrc="signup.cfm";
		vhead="Sign-Up";
	}
	else if(cnum==5) {
		vsrc="contact.cfm";
		vhead="Contact Us";
	}
	else if(cnum==6) {
		window.location.replace("http://www.scoutingweb.com");
	}
	else if(cnum==7) {
		window.location.replace("http://software.epilogsys.com");
	}
	else if(cnum==8) {
		window.location.replace("http://www.epilogsys.com");
	}
	var elem=document.getElementById("contentiframe");
	elem.src=vsrc;
	var elem=document.getElementById("headcontainer");
	elem.innerText=vhead;
	var elem=document.getElementById("headshadowcontainer");
	elem.innerText=vhead;
	setTimeout("reposition_elements()", 500);
}
