﻿function OpenWindow(url, width, height) {
    var wn =  window.open (url,"mywindow","status=1,width="+width+",height="+height+",scrollbars=auto,resizable=yes"); 
    wn.focus();
}
function toggleLayer( whichLayer, strDisplay )

	{

	  var elem, vis;

	  if( document.getElementById ) // this is the way the standards work

		elem = document.getElementById( whichLayer );

	  else if( document.all ) // this is the way old msie versions work

		  elem = document.all[whichLayer];

	  else if( document.layers ) // this is the way nn4 works

		elem = document.layers[whichLayer];

	  vis = elem.style;

	  // if the style.display value is blank we try to figure it out here

	  if (strDisplay == 'show') {

	  	vis.display = 'block';

	  } else if (strDisplay == 'hide') {

	  	vis.display = 'none';

	  } else {

	  	if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)

			vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';

	  		vis.display = (vis.display==''||vis.display=='block')?'none':'block';

	  }

	}
function clearText(input) {
       if (input.value == "Email") {
	   	input.value = "";
	   } else if (input.value == "") {
	   	input.value = "Email"
	   }
    }
var strThisElementID;
function loadurl(dest, thisID) { 
 
        try { 
               xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); 
        } catch (e) { 
               
        } 
         
        strThisElementID = thisID
        xmlhttp.onreadystatechange = triggered;           
        xmlhttp.open("POST", dest); 
        xmlhttp.send(""); 
        } 
         
        function triggered() { 
        if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete") { 
                document.getElementById(strThisElementID).innerHTML = xmlhttp.responseText; 
        } 
} 
function getAlert() {
    loadurl("alert.aspx", "alertBox");
}

function autoBodyLoad() {
	try {
		getAlert();
     	var ivAlert = setInterval ( "getAlert();", 7000 );
		addReflections();
	} catch (e) {
		
	}
     
}