var SiteURL = "ww"+"w.hw"+"pi.b"+"iz";
var SiteTitle = "Heartland Wood Products Inc";
var i = 0
var test =""
var gotolocation = ""
expireDate = new Date
DeleteDate = new Date
expireDate.setMonth(expireDate.getDate()+1)
DeleteDate.setDate(expireDate.getDate()-1)

function CheckTop(Loc){
	if (top.location ==Loc) {
		top.location.href = "index.html?" + Loc
	}
}

function loadcontent(address){
	
	var work = "" + address
	var temp = new Array();
	temp = work.split("?")

	if(work.indexOf("?")>0){
		if(parent.document.pagecontents.location!=temp[1]){
			parent.document.pagecontents.location=temp[1]		
		}
		
	}

	
	else if(parent.document.pagecontents.title == "about:blank") {
		parent.document.pagecontents.location = "home.html"	
	}
	if(parent.document.pagecontents.location==temp[1]) {
		parent.document.location = "index.html"	
	}
}

function OpenPicWindow(FileName, FileDesc){
	PicWindow = window.open("", "PicWin", "width=1000,height=470,resizable=yes,scrollbars=yes,menubar=no,statusbar=no,");
	PicWindow.Document
	PicWindow.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><HTML><HEAD><link rel='stylesheet' href='hwpipop.css' type='text/css'><Title>" + FileDesc + "</Title></head>")
	PicWindow.document.write("<BODY><h1>"+ FileDesc + "</h1>")
	PicWindow.document.write ("<Center><img id='picwinpic' alt=" + FileDesc + " src=" + FileName + "><br>")
	PicWindow.document.write ("<FORM METHOD='LINK' ACTION='Javascript:self.close()'>")
	PicWindow.document.write ("<INPUT TYPE='submit' VALUE='Close'></FORM></CENTER></BODY></HTML>")
	PicWindow.document.close
}

function ShowMessage(MessageText){
	MesWindow = window.open("", "MesWin", "width=600,height=170,resizable=no,scrollbars=yes,menubar=no,statusbar=no");		
	MesWindow.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><HTML><HEAD><Title>Special Message</Title>")		
	MesWindow.document.write("<link rel='stylesheet' href='hwpipop.css' type='text/css'></head>");
	MesWindow.document.write("<body><div class='showmessage'>"+ MessageText + "</DIV><BR>")
	MesWindow.document.write("<div class='showmessage'>We will create a custom truss for you upon request.</DIV><BR>")
	MesWindow.document.write ("<FORM METHOD='LINK' ACTION='Javascript:self.close()'><div class='showmessage'><INPUT class='buttonclass' TYPE='submit' VALUE='Close'></DIV><BR></BODY></HTML>")
	MesWindow.document.close
}

function right(e) {
	if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
		return false;
	else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
		alert("This function is not allow.");
		return false;
	}
	return true;
}

function preventrightclick(){
	document.onmousedown=right;
	document.onmouseup=right;
	if (document.layers) window.captureEvents(Event.MOUSEDOWN);
	if (document.layers) window.captureEvents(Event.MOUSEUP);
	window.onmousedown=right;
	window.onmouseup=right;
}

function sendadminmess(topcaption,sPCode){
	frmWindow = window.open("", "frmWin1", "width=500,height=450,resizable=yes,scrollbars=yes,menubar=no,statusbar=no");

	frmWindow.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><HTML><head><Title>Send a Message to " + topcaption + "</Title>")
	frmWindow.document.write("<scr"+"ipt language='JAV"+"ASCRIPT' type='TEXT/JAV"+"ASCRIPT'>")
	frmWindow.document.write("function SubmitMess(){ ")
	frmWindow.document.write("document.getElementById('mailForm').submit(); ")
	frmWindow.document.write("self.close();")
	frmWindow.document.write("alert('Your message was sent!'); ")
	frmWindow.document.write(" } </scr"+"ipt>")
	frmWindow.document.write("<link rel='sty"+"lesheet' href='hwpipop."+"css' type='text/css'>")
	frmWindow.document.write("</head><body><h1>" + topcaption + "</h1>")
	frmWindow.document.write("<form method=post action='http://us.1.p6.webhosting.yahoo.com/forms?login=hwpisemo' id='mailForm'>")
	frmWindow.document.write("<input  name='EMAIL' value=" + topcaption + " type='hidden'><input  name='PCode' value=HWPI" + sPCode + " type='hidden'>")
  	frmWindow.document.write("<table class='qrtable'><tbody>")
  	frmWindow.document.write("<tr><td class='qrtdleft'> Your name:</td><td class='qrtdright'><input class='namebox' name='contact_name' value='' type='text'></td></tr>")
  	frmWindow.document.write("<tr><td class='qrtdleft'>Your Email Address:</td><td class='qrtdright'><input class='namebox' name='your_email' value='' type='text'></td></tr></tbody></table>")
	frmWindow.document.write("<br>Please type your message below:<br>&nbsp;<textarea rows='10' cols='55' name='Message'></textarea>")
	frmWindow.document.write("<input name='Via' value='Email Form' type='hidden'><br><center>")
	frmWindow.document.write("<input class='buttonclass' name='cmdSubmit'  value='Send Message' type='button' onclick='Jav"+"ascript:Submi"+"tMess()' style='width:1.25in;'>")
	frmWindow.document.write("&nbsp;<input class='buttonclass' value='Cancel' onclick='Jav"+"ascript:self"+".close()' type='button' style='width:1.25in;'></center></form></body></html>")
	frmWindow.document.close

}

function pagedate(){
	var dateModified = document.lastModified;
	var month=new Array(12);
	month[0]="January";
	month[1]="February";
	month[2]="March";
	month[3]="April";
	month[4]="May";
	month[5]="June";
	month[6]="July";
	month[7]="August";
	month[8]="September";
	month[9]="October";
	month[10]="November";
	month[11]="December";
	var work=dateModified.split("/")
	var work2 = work[0] -1
	return ("Last updated: " + month[work2] + " "+ work[1] +", "+work[2].substring(0,4))
}

function showquote(){
	frmWindow = window.open("", "frmWin1", "width=880,height=620,resizable=yes,scrollbars=yes,menubar=no,statusbar=no");
	frmWindow.document.location= "sendquote1.html"
	frmWindow.document.close
}

function shownewbio(CName, CPic, Cbio, Cext,CTitle){
	BioWindow = window.open("", "BioWin", "width=800,height=750,resizable=yes,scrollbars=yes,menubar=no,statusbar=no");		
	BioWindow.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><HTML>")
	BioWindow.document.write("<HEAD><Title>" + CName + "</Title>")
	BioWindow.document.write("<scr"+"ipt language='JAVASC"+"RIPT' type='TEXT/JAVASCRIPT'>")
	BioWindow.document.write("function right(e) {")
	BioWindow.document.write("	if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))")
	BioWindow.document.write("		return false;")
	BioWindow.document.write("	else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {")
	BioWindow.document.write("		alert('This function is not allowed.');")
	BioWindow.document.write("		return false;")
	BioWindow.document.write("	}")
	BioWindow.document.write("	return true;")
	BioWindow.document.write("}")
	BioWindow.document.write("function preventrightclick(){")
	BioWindow.document.write("	document.onmousedown=right;")
	BioWindow.document.write("	document.onmouseup=right;")
	BioWindow.document.write("	if (document.layers) window.captureEvents(Event.MOUSEDOWN);")
	BioWindow.document.write("	if (document.layers) window.captureEvents(Event.MOUSEUP);")
	BioWindow.document.write("	window.onmousedown=right;")
	BioWindow.document.write("	window.onmouseup=right;")
	BioWindow.document.write("}")
	BioWindow.document.write("function SubmitMess(){")
	BioWindow.document.write("document.getElementById('mailForm').submit();")
	BioWindow.document.write("self.close();")
	BioWindow.document.write("alert('Your message was sent!');")
	BioWindow.document.write("}")
	BioWindow.document.write("</scr"+"ipt><link rel='stylesheet' href='hwpipop.css' type='text/css'>")
	BioWindow.document.write("</HEAD><body onload=\"preventrightclick()\">" )
	BioWindow.document.write("<Center><H2>" + CTitle + "</h2></center>")
	BioWindow.document.write("<table border=0 width=\"100%\"><tbody><tr><td width=\"300px\">")
	BioWindow.document.write("<div id=\"bioaddress\">" + CName.substr(0,2) + "<span style='display:none'>blah</span>" + CName.substr(2,4) +"<span style='display:none'>blah</span>" + CName.substr(6)  + "</div>")
	if (CPic!="" ){
		BioWindow.document.write("<table border=0 id=\"goldheartland\"><tr><td><img alt="+CName+" src='photos/"+ CPic + ".jpg' id='bioimg' onmousedown=\"Javascript:self.close()\"></td></td></table>")
	}
	else{
		BioWindow.document.write("<img alt='" + CName + "' src='photos/hwpisky.jpg' id='bioimg' onmousedown=\"Javascript:self.close()\"><br>")		
	}
	BioWindow.document.write("</td><td valign=\"middle\">")
	BioWindow.document.write("<div class='goldheartland'>Heartland Wood Products, Inc.</div><div id=\"bioaddress\">121 North Interstate Drive<br>Sik<span style='display:none'>@</span>eston, MO 63<span style='display:none'>911</span>801<br>")
	BioWindow.document.write("Phone: (8<span style='display:none'>911</span>00) 325-0<span style='display:none'>911</span>114 <br>Design Department Fax: (57<span style='display:none'>911</span>3) 47<span style='display:none'>911</span>1-91<span style='display:none'>911</span>29<br>")
	BioWindow.document.write("Billing Department Fax: (57<span style='display:none'>911</span>3) 47<span style='display:none'>911</span>1-88<span style='display:none'>911</span>48<br>")
	BioWindow.document.write("My " + Cext + "</div><br>")
	if (Cbio!="" ){
		BioWindow.document.write("<center><IFRAME SRC='"+ Cbio + ".html' id='bioiframe' name='bioiframe' FRAMEBORDER=1 SCROLLING='auto'></IFRAME></center>")
	}
	else{
		BioWindow.document.write("<center><IFRAME SRC='blankbio.html' id='bioiframe' name='bioiframe' FRAMEBORDER=1 SCROLLING='auto'></IFRAME></center>")
	}
	BioWindow.document.write("</td></tr></tbody></table><hr style='width:100%;color:silver;'>")
	BioWindow.document.write("<form method=post action='http://us.1.p6.webhosting.yahoo.com/forms?login=hwpisemo' id='mailForm'>")
	BioWindow.document.write("<input  name='EMAIL' value="+CName+" type='hidden'><input  name='Source' value=biopage type='hidden'>")
	BioWindow.document.write("<b>Contact me:</b><table style='width: 100%; text-align: left;' border='0' cellpadding='0' cellspacing='1'>")
	BioWindow.document.write("<tbody id=\"ogtables\"><tr><td style='vertical-align: top; text-align: right;'>")
	BioWindow.document.write("Your name:</td><td style='vertical-align: top;'><input name='contact_name' value='' type='text' class='bionamebox'>")
	BioWindow.document.write("</td><td style='vertical-align: top; text-align: right;'>Your Email Address:")
	BioWindow.document.write("</td><td style='vertical-align: top;'><input name='your_email' value='' type='text' class='bionamebox'>")
	BioWindow.document.write("</td></tr></tbody></table>Please type your message below:<br>")
	BioWindow.document.write("&nbsp;<textarea rows='8' cols='90' name='Message'></textarea><input name='Via' value='Email Form' type='hidden'><br><br>")
	BioWindow.document.write("<center><input name='cmdSubmit'  value='Send Message' type='button' onclick='Javascript:SubmitMess()' class='buttonclass'>")
	BioWindow.document.write("&nbsp;<input value='Close' onclick='Javascript:self.close()' type='button' class='buttonclass'></center>")
	BioWindow.document.write("<br></form><script language='JAVASCRIPT' type='TEXT/JAVASCRIPT'>preventrightclick()")
	BioWindow.document.write("</script></div></body></html>")
	BioWindow.document.close		
}
