
function back() 
{
	history.go(-1);
}


function printit()
{  
	if (window.print) {window.print();}
	else {
		var WebBrowser='<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
		document.body.insertAdjacentHTML('beforeEnd',WebBrowser);
		WebBrowser1.ExecWB(6, 2);
	}
	var intSW=screen.availWidth/2-250;
	var strNewWindow=window.open("/html/claims/thankyou.asp","FasterClaims",'top=25,left='+intSW+',scrollbars=no,height=150,width=500');
}


function popupWindow(file) 
{
	var strNewWindow=window.open("","OnlineDemo",'top=25,left=25,scrollbars=no,height=310,width=755');
	strNewWindow.document.open("text/html","replace");
	strNewWindow.document.writeln('<html>');
	strNewWindow.document.writeln('<head>');
	strNewWindow.document.writeln('<link rel="stylesheet" type="text/css" href="/theme/text.css">');
	strNewWindow.document.writeln('<script language="javascript">');
	strNewWindow.document.writeln('<!-'+'-');
	strNewWindow.document.writeln('function closeWindow() {this.window.close();}');
	strNewWindow.document.writeln('-'+'->');
	strNewWindow.document.writeln('</script>');
	strNewWindow.document.writeln('<title>Online Demonstration</title>');
	strNewWindow.document.writeln('</head>');
	strNewWindow.document.writeln('<body background="/images/bg2.gif" style="margin: 10px">');
	strNewWindow.document.writeln('<table border="0" width="100%" cellpadding="0" cellspacing="0">');
	strNewWindow.document.writeln('  <tr>');
	strNewWindow.document.writeln('    <td align="center">');
	strNewWindow.document.writeln('      <table border="1" style="border: 1px solid #2E4A72; border-spacing: 0pt; border-collapse: collapse" height="260" width="725" style="border-collapse: collapse; border-spacing: 0px;" cellpadding="0" cellspacing="0">');
	strNewWindow.document.writeln('        <tr>');
	strNewWindow.document.writeln('          <td bgcolor="#2E4A72">');
	strNewWindow.document.writeln('          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="725" height="260">');
	strNewWindow.document.writeln('            <param name="movie" value="/html/products/products/'+file+'.swf">');
	strNewWindow.document.writeln('            <param name="quality" value="high">');
	strNewWindow.document.writeln('            <param name="LOOP" value="false">');
	strNewWindow.document.writeln('            <param name="WMode" value="Transparent"><param name="SCALE" value="exactfit">');
	strNewWindow.document.writeln('            <embed src="/html/products/products/'+file+'.swf" width="725" height="260" loop="false" alt="Online Demonstration" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit"></embed>');
	strNewWindow.document.writeln('          </object>');
	strNewWindow.document.writeln('          </td>');
	strNewWindow.document.writeln('        </tr>');
	strNewWindow.document.writeln('      </table>');
	strNewWindow.document.writeln('    </td>');
	strNewWindow.document.writeln('  </tr>');
	strNewWindow.document.writeln('</table>');
	strNewWindow.document.writeln('<p align="center"><a href="javascript:closeWindow()">Close this window</a></p>');
	strNewWindow.document.writeln('</body>');
	strNewWindow.document.writeln('</html>');
	strNewWindow.document.close();
}


function largeImageDisplay(img,H,W) 
{
	var strNewWindow=window.open("","LargeImageDisplay",'top=25,left=25,scrollbars=no,height='+H+',width='+W);
	strNewWindow.document.open("text/html","replace");
	strNewWindow.document.writeln('<html>');
	strNewWindow.document.writeln('<head>');
	strNewWindow.document.writeln('<link rel="stylesheet" type="text/css" href="/theme/text.css">');
	strNewWindow.document.writeln('<script language="javascript">');
	strNewWindow.document.writeln('<!-'+'-');
	strNewWindow.document.writeln('function closeWindow() {this.window.close();}');
	strNewWindow.document.writeln('-'+'->');
	strNewWindow.document.writeln('</script>');
	strNewWindow.document.writeln('<title>Display Large Image</title>');
	strNewWindow.document.writeln('</head>');
	strNewWindow.document.writeln('<body background="/images/bg2.gif" style="margin: 10px">');
	strNewWindow.document.writeln('<table border="0" width="100%" cellpadding="0" cellspacing="0">');
	strNewWindow.document.writeln('  <tr>');
	strNewWindow.document.writeln('    <td align="center">');
	strNewWindow.document.writeln('      <img src="'+img+'">');
	strNewWindow.document.writeln('    </td>');
	strNewWindow.document.writeln('  </tr>');
	strNewWindow.document.writeln('</table>');
	strNewWindow.document.writeln('<p align="center"><a href="javascript:closeWindow()">Close this window</a></p>');
	strNewWindow.document.writeln('</body>');
	strNewWindow.document.writeln('</html>');
	strNewWindow.document.close();
}


function requiredFields() 
{
	var strRequired='',f=document.FrontPage_Form1;
	if (f.SendTo[1].checked) {
		strRequired=f.CareOfDealer.value;
		if (strRequired=='') {
			alert("Please complete the required fields for dealer delivery. The Care Of field needs to be filled in.");
			return;
		}
	}
	else if (f.SendTo[2].checked) {
		strRequired=f.CompanyName.value;
		if (strRequired=='') {
			alert("Please complete the required fields for delivery. The Company Name field needs to be filled in.");
			return;
		}
		strRequired=f.Address1.value;
		if (strRequired=='') {
			alert("Please complete the required fields for delivery. The Address Line 1 field needs to be filled in.");
			return;
		}
		strRequired=f.City.value;
		if (strRequired=='') {
			alert("Please complete the required fields for delivery. The City field needs to be filled in.");
			return;
		}
		strRequired=f.Zip.value;
		if (strRequired=='') {
			alert("Please complete the required fields for delivery. The Zip Code field needs to be filled in.");
			return;
		}
		if (strRequired.search(/[^\d|\-]/g)!=-1) {
			alert("The Zip Code field should contain only numbers and dashes. Please correct it.");
			return;
		}
		if (strRequired.length!=5&&strRequired.length!=9&&strRequired.length!=10) {
			alert("The Zip Code field can be 5 characters long, 9 characters long, or 10 characters long. Please correct your entry.");
			return;
		}
	}
	f.submit();
}



function tab(a,b) 
{
	if (b) {
		eval('document.'+a+'.src = "images/'+a+'_btn-over.gif"');
	}
	else {
		eval('document.'+a+'.src = "images/'+a+'_btn.gif"');
	}
} 
