

function newWin(url,img,title,w,h) {

	   if (! (url) && ! (img)) { return; }
	   var day= new Date();
	   var id = day.getTime();
	   var ww = w+75;
	   var wh = h+150;
	   if ((screen.height) && (wh > screen.height-100)) { wh = screen.height-100; }
	   var params = 'width='+ww+',height='+wh+',scrollbars,resizable';
	   var t = (title != '')?title:img;
	   if (url=='') {
	      var msg='<!DOCTYPE HTML PUBLIC "-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN" "http:\/\/www.w3.org/TR\/html4\/loose.dtd">\n'+
		          '<meta http-equiv="Content-Type" content="text\/html; charset=iso-8859-1">\n'+
		          '<html><head><title>'+t+'<\/title><\/head>'+
		          '<style type="text\/css">\n'+
				  'html,body { font-family: Arial,Helvetica,Sans-Serif; }\n'+
				  'h3 { text-align: center; }\n'+
				  'td { text-align: center; }\n'+
				  '<\/style><body>\n'+
				  '<h3>'+t+'<\/h3>\n <table align="center" border="0"><tr><td><img src="'+img+'" width="'+w+'" height="'+h+'" border="0" alt="'+title+'"></td></tr>\n'+
				  '<tr><td><hr width="100%" size="1"><form><input type="button" onClick="javascript:window.close();" value="Close Window">\n'+
				  '<hr width="100%" size="1"><\/form><\/td><\/tr><\/table><\/body><\/html>\n';
	      var win = open('',id,params);
		  win.document.write(msg);
		  win.document.close();
	   }
	   else { var win = open(url,id,params); } 
}

// Library Security Page, knogo

function securityWin(img,title,w,h) {
	     var day = new Date();
		 var id = day.getTime();
		 var ww = w+75;
		 var wh = w+225;
		 if (screen.height) { if (wh > screen.height-100) { wh = screen.height-100; } }
		 else { if (wh > 600) { wh=600; } }
		 var params = 'width='+ww+',height='+wh+',scrollbars,resizable';
		 
		 var msg = '<html><head><title>'+title+'<\/title>\n'+
		           '<style type="text/css">\n'+
				   'body,html { font-family:arial,helvetica,sans-serif; }\n'+
				   '.center { text-align:center; }\n'+
				   '<\/style><\/head><body><table width="95%" align="center" border="0"><tr><td class="center"><h3>'+title+'<\/h3>\n'+
		           '<a href="javascript:window.close();"><img src="images/'+img+'.jpg" width="'+w+'" height="'+h+'" border="0" alt="'+title+'"><\/a><br><\/td><\/tr>\n'+
		           '<tr><td align="center"><form action=""><hr width="100%" size="1"><input type="button" onClick="window.close();" value="Close Window"><hr width="100%" size="1"><\/form<\/td><\/tr>\n'+
		           '<\/table><br><br><\/body><\/html>\n\n';
		 var win=open('',id,params);
		 win.document.write(msg);
		 win.document.close();
		 return false;
}
	 
	 
// Scanners page

function scannerWin(img,title,w,h) {
	     var day = new Date();
		 var id = day.getTime();
		 var ww = w+75;
		 var wh = w+125;
		 if (screen.height) { if (wh > screen.height-100) { wh = screen.height-100; } }
		 else { if (wh > 600) { wh=600; } }
		 
		 var params = 'width='+ww+',height='+wh+',scrollbars,resizable';
		 
		 var msg = '<html><head><title>'+title+'<\/title>\n'+
		           '<style type="text/css">\n'+
			       'body,html { font-family: arial, helvetica, sans-serif; }\n'+
				   '.center { text-align: center; } \n'+
			       '<\/style><\/head><body><table width="95%" align="center" border="0"><tr><td class="center">\n'+
                   '<h3>'+title+'<\/h3>\n'+
		           '<a href="javascript:window.close();"><img src="images/'+img+'.jpg" width="'+w+'" height="'+h+'" border="0" alt="'+title+'"><\/a><br><\/td><\/tr>\n';
		 if (img == 'ls4208')         { msg += '<tr><td>Shown with the Adjustable Auto Scan Stand.<br><br>The LS 4208 Laser Scanner is the most popular barcode scanner in the retail industry and in libraries. You will find the scanner in most stores, including Wal-Mart, Toys \'R\' us, and Mervyn\'s. The reason for its wide use is durablilty and excellent scanning capabilities. The scanner has a 5 year warranty.<br><\/td><\/tr>\n'; }
         if (img == 'ls2280')         { msg += '<tr><td align="center">Shown with the Adjustable Auto Scan Stand.<\/td><\/tr>'; }
		 if (img == 'it3800')         { msg += '<tr><td align="center">Shown with the Adjustable Auto Scan Stand.<\/td><\/tr>'; }
         if (img == 'ms9520')         { msg += '<tr><td align="center">Lightweight with attached heavy base stand.<\/td><\/tr>\n'; }
		 if (img == 'ccdscanner')     { msg += '<tr><td align="center">Affordable and reliable, this hand-held scanner is fully programmable and can support all popular computer interfaces.<\/td><\/tr>\n'; }
		 if (img == 'scanstand')      { msg += '<tr><td>Ergonomically designed, the heavy-base stand adjusts to the proper angle, allowing the scanner to read barcodes without lifting the book and in most cases, without removing the scanner from the stand. The Adjustable Auto Scan Stand was designed for use with the Symbol LS 4000 series, Symbol LS2200 series,  and Hand Held Products IT 3800. It is adaptable for use with other scanners.  The Adjustable Auto Scan Stand is powder coated, weighs 5 lbs, and has a lifetime warranty.<\/td><\/tr>\n'; }
		 if (img == 'pmrscanner')     { msg += '<tr><td>The Portable Memory Scanner will operate on your circulation counter for scanning barcode labels. When inventory comes, disconnect the scanner from the cables that go to the PC, attach the battery pack to the scanner, and use the program menu that is included with the unit. You are now able to use this as a portable data collector. When you have completed your inventory, return the scanner to the PC, disconnect the battery pack, connect the scanner to the computer cables, scan three commands from the menu, and download the data. To once again use this for regular scanning, scan three commands from the menu. <br><br>Reads up to 3000 items before you need to download.<\/td><\/tr>\n'; }
		 msg += '<tr><td class="center"><fomr action=""><hr width="100%" size="1"><input type="button" onClick="window.close();" value="Close Window"><hr width="100%" size="1"><\/form><\/td><\/tr>\n'+
		        '<\/table><br><br><\/body><\/html>\n\n';
		 var win=open('',id,params);
		 win.document.write(msg);
		 win.document.close();
		 return false;
}
// Contact page only 


    function chkForm(form) {
	   if ((form.Name.value == ''))
	   {
	      alert('Please enter your Name and other fields marked with (*)\n so that we may reply to your inquiry.');
	   }
	   else if (form.Zip.value.search(/123456/i)>=0)
	   {
	      alert('Invalid Zip.');
	   }
	   else if (form.Email.value.search(/.ru/i)>=0)
	   {
	      alert('Invalid E-mail Address.');
	   }
	   else if ((form.Email.value == ''))
	   {
		alert('Please enter an Email address and other fields marked with (*)\n so that we may reply to your inquiry.');
	   }
	   else if ((form.Organization.value == ''))
	   {
	      alert('Please enter the name of your Organization (Library/School)\n so that we may reply to your inquiry.');
	   }
	   else if ((form.Address1.value == ''))
	   {
	      alert('Please enter the first line of your Address\n so that we may reply to your inquiry.');
	   }
 	   else if ((form.City.value == '')|(form.State.value == '')|(form.Zip.value == ''))
	   {
	      alert('Please enter your City, State and Postal Code\n so that we may reply to your inquiry.');
	   }
	   else if ((form.Phone1.value == ''))
	   {
	      alert('Please enter a Phone number\n so that we may reply to your inquiry.');
	   }
	   else if (form.Comments.value.search(/porn/i)>=0)
	   {
	      alert('The comment contains a prohibited word: Porn.');
	   }
	   else if (form.Comments.value.search(/viagra/i)>=0)
	   {
	      alert('The comment contains a prohibited word: Viagra.');
	   }
 	   else if (form.Comments.value.search(/lolita/i)>=0)
	   {
	      alert('The comment contains a prohibited word: Lolita.');
	   }
	   else { form.submit(); }
	   return false;
	}
	
	
	