// Functions

function headerdispbak(){
text=""
text+='<body topmargin="5" leftmargin="10">'
text+='<table border="0" width="100%" style="border-bottom-style: solid; border-bottom-color: #C0C0C0">'
text+='<tr>'
text+='<td width="400" valign="bottom"><b><i><font face="Arial" size="5" color="#006666">INFRARED SUPPLY  (800)783-3119</font></i></b></td>'
text+='<td></td>'
text+='<td width="200" align="right" valign="bottom">&nbsp;<font face="Arial" size="2">Login - View Cart - Account Info </font></td>'
text+='</tr>'
text+='</table>'
document.write(text)
}

function tabmenu(tabname){
text=""

text+='<body topmargin="10" leftmargin="15" link="#0000FF" vlink="#0000FF" alink="#0000FF">'
text+='<table border="0" width="100%" style="border-bottom-style: solid; border-bottom-color: #C0C0C0">'
text+='<tr>'
text+='<td width="400" valign="bottom"><b><i><font face="Arial" size="5" color="#006666">INFRARED SUPPLY  (800)783-3119</font></i></b></td>'
text+='<td></td>'
//text+='<td width="200" align="right" valign="bottom">&nbsp;<font face="Arial" size="2">Login - View Cart - Account Info </font></td>'
text+='</tr><tr>'
text+='<td class="fjdiv">A Division Of F.J. Evans Engineering Company, Inc.</td>'
text+='</tr>'
text+='</table>'

text+='<table border="0" cellpadding="0" cellspacing="0" width="100%">'
text+='<tr>'
text+='<td width="100%" height="2" bgcolor="#FFFFFF"></td>'
text+='</tr>'
text+='</table>'

text+='<table border="0" width="100%" cellspacing="0" cellpadding="0">'
text+='<tr>'
text+='<td height="2"></td>'
text+='<td width="170" rowspan="2" valign="bottom" align="right">'
//text+='<form style="margin-top: 0; margin-bottom: 0">'
//text+='<font face="Arial" size="2">Search: </font>'
//text+='<input type="text" name="T1" size="12" style="font-size: 8pt"><input type="submit" value="Go" name="B1" style="font-size: 8pt">'
//text+='</form>'
text+='</td>'
text+='</tr>'
text+='<tr>'
text+='<td>'

rootloc="http://www.irsystemsdirect.com/"
tabrow=7
tabcol=2
a = new Array(tabrow)
for (i=0; i < tabrow; i++) {
   a[i] = new Array(tabcol)
}
a[0][0]="Welcome"
a[0][1]="index.html"
a[1][0]="Sunglo"
a[1][1]="patioheat/pricing_sg.htm"
a[2][0]="Sunpak"
a[2][1]="patioheat/pricing_sp.htm"
a[3][0]="High Intensity"
a[3][1]="rvr/hi.htm"
a[4][0]="Tube Heaters"
a[4][1]="rvr/tubes.htm"
a[5][0]="Electric"
a[5][1]="fostoria/index.html"
a[6][0]="Contact Us"
a[6][1]="contacts.htm"

text+='<table border="0" cellspacing="0" cellpadding="0">'
text+='<tr>'
for (i=0; i<tabrow;i++) {
	if (tabname==a[i][0]) {
		text+='<td class="bgon" width="10"><img border="0" src="'+rootloc+'lefttoptab.gif" width="10" height="19"></td>'
		text+='<td class="bgon"><a class="ontab">&nbsp;'+a[i][0]+'&nbsp;</a></td>'
		text+='<td class="bgon" width="10"><font face="Arial" size="2"><img border="0" src="'+rootloc+'righttoptab.gif" width="10" height="19"></font></td>'
	} else {
		text+='<td class="bgoff" width="10"><img border="0" src="'+rootloc+'lefttoptab.gif" width="10" height="19"></td>'
		text+='<td class="bgoff"><a href='+rootloc+a[i][1]+' class="offtab">&nbsp;'+a[i][0]+'&nbsp;</a></td>'
		text+='<td class="bgoff" width="10"><img border="0" src="'+rootloc+'righttoptab.gif" width="10" height="19"></td>'
	}
}
text+='</tr></table>'
text+='</table>'

text+='</td>'
text+='</tr>'
text+='</table>'

text+='<table border="0" cellpadding="0" cellspacing="0" width="100%">'
text+='<tr>'
text+='<td width="100%" height="10" bgcolor="#006666"></td>'
text+='</tr>'
text+='</table>'

text+='<table border="0" cellpadding="0" cellspacing="0" width="100%">'
text+='<tr>'
text+='<td width="100%" height="1" bgcolor="#FFFFFF"></td>'
text+='</tr>'
text+='</table>'

text+='<table border="0" cellpadding="0" cellspacing="0" width="100%">'
searchval=""
haystack=document.referrer
if(haystack.search("search.yahoo.com")>0){
  haystack=haystack.replace(/\+/g," ")
  haystack=haystack.replace(/%22/g,"")
  haystack=haystack.replace(/%27/g,"")
  begin=haystack.indexOf("p",10)+2
  end=haystack.indexOf("&")
  strlen=end-begin
  searchval=haystack.substr(begin,strlen)
}
if(haystack.search("google.com")>0){
  haystack=haystack.replace("site:www.fjevans.com+","")
  haystack=haystack.replace(/\+\+/g,"")
  haystack=haystack.replace(/\+/g," ")
  haystack=haystack.replace(/%22/g,"")
  haystack=haystack.replace(/%27/g,"")
  begin=haystack.indexOf("q")+2
  searchval=haystack.substr(begin)
}
if(haystack.search("search.aol.com")>0){
  haystack=haystack.replace(/\+/g," ")
  haystack=haystack.replace(/%22/g,"")
  haystack=haystack.replace(/%27/g,"")
  begin=haystack.indexOf("query")+6
  end=haystack.indexOf("&",begin)-1
  strlen=end-begin
  searchval=haystack.substr(begin,strlen)
}
if(haystack.search("search.msn.com")>0){
  haystack=haystack.replace("site%3Ewww.fjevans.com+","")
  haystack=haystack.replace("site:www.fjevans.com+","")
  haystack=haystack.replace(/\+/g," ")
  haystack=haystack.replace(/%22/g,"")
  haystack=haystack.replace(/%27/g,"")
  begin=haystack.indexOf("q")+2
  end=haystack.indexOf("&")
  strlen=end-begin
  searchval=haystack.substr(begin,strlen)
}
text+='<tr>';
text+='<td>';
text+= '<table width="100%" border=0 cellpadding=0><tr><td height=4></td></tr></table>';
text+='<table border=0 width="99%" cellpadding=0 cellspacing=0 class="arial9"><tr>';
rootloc="http://www.fjevans.com/";
text+='<form name="search" action="http://www.fjevans.com/searchsi.php" target="_top">';
text+='<td bgcolor="C4FFD7" style="padding: 5; border: solid 1 #666666">';
text+='Search Our Current Site: ';
text+='<input type="text" name="seektext" style="width: 400; background-color: FFFFFF" value="'+searchval+'" style="border-style: solid; border-width: 1; border-color=666666">';
text+='&nbsp;';
text+='<input type="image" src="'+rootloc+'small_submit.gif">';
text+='&nbsp;&nbsp;';
text+='</td>';
text+='</form>';
text+='</tr></table>';
text+='</td>';
text+='</tr>';

text+='<tr>'
text+='<td class="arial9red">'
text+='&nbsp;<br>'
text+='<i>'
text+='THE PAGE BELOW IS FROM OUR OLD SITE!<br>'
text+='USE THE SEARCH BAR ABOVE OR '
text+='<a href="http://www.fjevans.com/index.php" target="_top">'
text+='CLICK HERE'
text+='</a>'
text+=' TO GO TO OUR NEW HOME PAGE.<br>'
text+='FULL PRODUCT LISTING AND DISCOUNTED PRICING IS NOW AVAILABLE.'
text+='</i>'
text+='<br>&nbsp;'
text+='</td>'
text+='</tr>'
text+='</table>'

document.write(text)

}


function footer(){
text=""
text+=
text+='<table border="0" width="100%">'
text+='<tr>'
text+='<td width="100%" colspan="2" bgcolor="#006666" height="3"></td>'
text+='</tr>'
text+='</table>'
text+='<table border="0" width="99%">'
text+='<tr>'
text+='<td width="70%"><a class="footer">All rights reserved.</a></td>'
text+='<td>'
text+='<p align="right"><a href="http://www.irsystemsdirect.com/index.html" target="_top" class="footer">Home</a><a class="footer"> | </a><a href="http://www.irsystemsdirect.com/contacts.htm" class="footer">Contact Us</a><a class="footer"> | (800)783-3119</a></td>'
text+='</tr>'
text+='</table>'
document.write(text)
}

