
function stoperror() {return true} window.onerror=stoperror


document.write("<LINK REL='Stylesheet' HREF='../inc/styles.css'>");

// Platform and browser sniffer end

//form validation
function ValidateForm(){
	var emailID=document.inputForm.email	
	if ((emailID.value==null)||(emailID.value=="")||(emailID.value=="your email address here")||(emailID.value.indexOf("@")==-1)||(emailID.value.indexOf(".")==-1)){
		alert("Please enter a valid email address.")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }
 
function focusNClearInput(inputObject) {
 var hasBeenFocused = inputObject.getAttribute("hasBeenFocused") != null;    
 if (!hasBeenFocused) {
     inputObject.setAttribute("hasBeenFocused", "true");
     inputObject.style.color = "#000000";
     inputObject.value = "";
     var thisForm = inputObject.form;
     for (ii = 0;  ii < thisForm.elements.length; ii++) {
         if (thisForm.elements[ii].type == "submit"){
             thisForm.elements[ii].disabled = false;
         }
     }	
 }                                
}
 

//navigation cell bgcolor highlighter start
function inCell(cell, newcolor) {
	if (!cell.contains(event.fromElement)) {
		cell.bgColor = newcolor;
	}
}

function outCell(cell, newcolor) {
	if (!cell.contains(event.toElement)) {
		cell.bgColor = newcolor;
	}
}
//navigation cell bgcolor highlighter start

function initializeUI(f,e) {
  // Put the cursor in the first text field and select contents, if any
  	document[f][e].focus(); //alert(document[f][e]);
	document[f][e].select();
}

//spawn window function
function spawnWindow(theURL,winName,properties) { 
  window.open(theURL,winName,properties);
  //window.moveTo(400, 200)
}

//netscape resize fix
 if(!window.saveInnerWidth) {
   window.onresize = resizeIt;
   window.saveInnerWidth = window.innerWidth;
   window.saveInnerHeight = window.innerHeight;
 }

 function resizeIt() {
     if (saveInnerWidth < window.innerWidth || 
         saveInnerWidth > window.innerWidth || 
         saveInnerHeight > window.innerHeight || 
         saveInnerHeight < window.innerHeight ) 
     {
        // window.history.go(0);
        location.reload();
     }
 }

//go to home page if subframe is loaded
function myHome() {
//if (window == top) top.location.href ='../index.htm';
}
   
//write background color then image
function newBg(imageName) { 
	document.write("<html><head><title></title><script language='JavaScript' src='../js/sniffer.js'></script></head><body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0' bgcolor='#ffffff'><table border=0 cellPadding=0 cellSpacing=0><tr><td width='1%'><img src='../img/spacer.gif' width='20' height='1' border='0' alt=''></td><td><a href='javascript:history.back()'><img border='0' src='" + imageName + "'  /></a><br><br><a href='javascript:history.back()'><img src='../img/back.gif' width='60' height='18' border='0' alt='back'></a></td></tr></table></body></html>");
	document.close();
} 

//#############image swap function for gallery page
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

function doPic(imgName) {
if (ns3up || ie4up) {
imgOn = ("" + imgName);
document.mainpic.src = imgOn;
   }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
//#########end gallery page 
      


