function reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}

function initsite() {
 var name=navigator.appName;
 var vers=navigator.appVersion;
 var agent=navigator.userAgent;
 vers=vers.substring(0,1);

 if(navigator.appName == "WebTV") {
  window.location = "nosupport.htm"
}

if (agent.search("Opera") >= 0)
 name="Opera";	//even Opera 7
if (name=="Konqueror")
 name="Konqueror";
if (name == "Netscape" && vers < 5)
  window.location = "nosupport.htm";
  
if(navigator.appVersion.indexOf("MSIE")!= -1){
 wholeString = navigator.appVersion
 starts = wholeString.indexOf("MSIE")
 ends = wholeString.indexOf(";",starts)
 version = wholeString.substring(starts+4, ends)
 if (version < 5){
  window.location = "nosupport.htm";
 }
 }
  
 reloadPage(true); 
}

function checkform(form) {
 if (form.name.value == "") {
  alert( "Please enter your name." );
  form.name.focus();
  return false ;
 }
 if (form.email.value == "") {
  alert( "Please enter your email address." );
  form.email.focus();
  return false ;
 }
 if (form.comments.value == "") {
  alert( "Please enter your message." );
  form.comments.focus();
  return false ;
 }
 
 return true ;
}

function checkform2(form) {
 if (form.name.value == "") {
  alert( "Please enter your name." );
  form.name.focus();
  return false ;
 }
 if (form.city.value == "") {
  alert( "Please enter your city." );
  form.city.focus();
  return false ;
 }
 if (form.email.value == "") {
  alert( "Please enter your email address." );
  form.email.focus();
  return false ;
 }
 if (form.biz_phone.value == "") {
  alert( "Please enter your business phone." );
  form.biz_phone.focus();
  return false ;
 }
 if (form.res_phone.value == "") {
  alert( "Please enter your residential phone." );
  form.res_phone.focus();
  return false ;
 }
 
 return true ;
}

function mkemail(name) {
 document.write('<a class=\"cnt\" href=\"mai' + 'lto:' + name + '@toron' + 'torenovatio' + 'ns.com\">' + name + '@toron' + 'torenovatio' + 'ns.com</a>');
}

function loadimage(url) 
{
   var img=new Image(); 
   img.src=url;
}

function showimage(url) 
{
}

var hWindow=null;
function popupImage(location,title,w,h,pos){
 if(hWindow!=null) {
  hWindow.close();	 
 }
 if(pos=='center'){
  LeftPosition=(screen.width)?(screen.width-w)/2:100;
  TopPosition=(screen.height)?(screen.height-h)/2:100;
 }
 else if((pos!='center') || pos==null){
  LeftPosition=100;
  TopPosition=100;
 }
 settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
 hWindow=window.open( "", title,settings); 
 hWindow.document.write('<html><head><title>'+title+'</title>');
 hWindow.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
 hWindow.document.write('</head>');
 hWindow.document.write('<body leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0 topmargin=0>');
 hWindow.document.write('<img src="'+location+'" alt="" width="'+w+'" height="'+h+'" border="0">');
 hWindow.document.write('</body></html>');
 hWindow.document.close();
 hWindow.focus(); 
}
