function regenerate(){
	window.location.reload()
}

function regenerate2(){
	if (document.layers)
	setTimeout("window.onresize=regenerate",450)
}

// for footer
function changetext(whichcontent){
	if (document.all)
		descriptions.innerHTML='<font face="Times New Roman" color="black" ><b>'+whichcontent+'</b><font>'
	else if (document.layers){
		document.d1.document.d2.document.write('<font face="Times New Roman" size="1">'+whichcontent+'</font>')
		document.d1.document.d2.document.close()
	}
}

function doSearch(val)
{
	if (val == '')
	{
		alert('MAKE ENTRY IN BOX & CLICK FIND');
	}
	else document.footer.submit();
}
//end for footer
function ChkPrice(){ 
	if(document.forms[0].price1.value.length == 0 && document.forms[0].price2.value.length == 0)
	{
		return true; 
	} else {
		if(document.forms[0].price1.value.length == 0 )
		{
			alert('Please, Enter Price !'); 
			document.forms[0].price1.focus(); 
			return false;
		} 
		else if(document.forms[0].price2.value.length == 0 )
		{
			alert('Please, Enter Price !'); 
			document.forms[0].price2.focus(); 
			return false; 
		}
		if(document.forms[0].price1.value.length > 0 && document.forms[0].price2.value.length > 0)
		{
			if(eval(document.forms[0].price1.value) > eval(document.forms[0].price2.value))
			{
				alert('Please, Enter more Price !');
				document.forms[0].price2.focus(); 
				return false; 
			}
		}
	}
} 

//reloads the window if Nav4 resized 
function MM_reloadPage(init) { 
	if (init==true) with (navigator) {
		if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
			document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; 
			onresize=MM_reloadPage;
		}
	}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
		location.reload();
} 
MM_reloadPage(true);


//open new window with name
function puppy(url){
	popup = window.open(url,"newwin","width= 800, height=500, menubar=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes");
	popup.location.href =url;
	if (popup.opener == null) popup.opener = window;
	popup.opener.name = "oldwin";
}

function goto(url) {
	opener.location.href = url;
}

//used in dropdowns on advanced search
function sel() { 
	document.Form1.xsearch.value = ""; 
} 

//go to page number function
function gotopage(val)
{
	if (val == '')
	{
		alert('Enter a Page Number');
	}
	else document.getmore.submit();
}

function checkTerms(){
	if( !document.forms[1].C1.checked ){
		alert("Please check the Purchase Policy box to proceed.");
		return false;
	}
}
function printPolicies(){
//	termsdisplay = terms.replace(/[\n]/g,"<p>");//document.forms[0].terms.value.replace(/[\n]/g,"<p>");
	termsdisplay = document.forms[0].terms.value.replace(/[\n]/g,"<p>");
	win = window.open();
//	alert(document.forms[0].terms.value);
	win.document.open();
	win.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\n');
	win.document.write('<html>\n');
	win.document.write('<head>\n');
	win.document.write('\t<title>Elsie Smith Inc. :: Purchase Policy</title>\n');
	win.document.write('</head>\n');
	win.document.write('<body>\n');
	win.document.write('<center><table width="80%">\n');
	win.document.write('<tr><td align="center"><hr><font face="Times New Roman"><strong><small>PURCHASE POLICY</small></strong></font><hr></td></tr>');
	win.document.write('<tr><td><font face="Times New Roman"><strong><small>' + termsdisplay);
	win.document.write('</small></strong></font></td></table></center>\n');
	win.document.write('\n');
	win.document.write('</body>\n');
	win.document.write('</html>\n');
	win.document.close();
	win.print();
	win.close();
}

function printPoliciesb(){
//	termsdisplay = terms.replace(/[\n]/g,"<p>");//document.forms[0].terms.value.replace(/[\n]/g,"<p>");
	termsdisplay = document.forms[1].terms.value.replace(/[\n]/g,"<p>");
	win = window.open();
//	alert(document.forms[0].terms.value);
	win.document.open();
	win.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\n');
	win.document.write('<html>\n');
	win.document.write('<head>\n');
	win.document.write('\t<title>Elsie Smith Inc. :: Purchase Policy</title>\n');
	win.document.write('</head>\n');
	win.document.write('<body>\n');
	win.document.write('<center><table width="80%">\n');
	win.document.write('<tr><td align="center"><hr><font face="Times New Roman"><strong><small>PURCHASE POLICY</small></strong></font><hr></td></tr>');
	win.document.write('<tr><td><font face="Times New Roman"><strong><small>' + termsdisplay);
	win.document.write('</small></strong></font></td></table></center>\n');
	win.document.write('\n');
	win.document.write('</body>\n');
	win.document.write('</html>\n');
	win.document.close();
	win.print();
	win.close();
}

function chkPnt(){
		window.print();
}

function go(){
	document.fChk.submit();
}
