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;
}

function MM_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}

function openPopup(open_bottomURL,open_name,open_height,open_width,open_topURL) {

	if (open_bottomURL) {bottomURL=open_bottomURL;}
	else {alert('no url');}
	
	if (open_topURL) {topURL=open_topURL;}
	else {topURL="externaltop.php";}
	
	if (open_name) {window_name=open_name;}
	else {window_name="openwin";}

	if (open_height) {window_height=open_height;}
	else {window_height=500;}

	if (open_width) {window_width=open_width;}
	else {window_width=600;}
	
	window_url = "''";
	window_features = "height=" + window_height + ",width=" + window_width + ",scrollbars,resizable,toolbar";
	topURL_CALL = "<frame src='" + topURL + "' scrolling='NO'>";
	bottomURL_CALL = "<frame src='" + bottomURL + "' name='popuptarget'>";
	//alert(URL+window_name+window_features);
	
	OpenWindow=window.open(window_url,window_name,window_features);
	OpenWindow.document.write("<html>")
	OpenWindow.document.write("<head>")
	OpenWindow.document.write("<title>Lasershield Systems, Inc.</title>")
	OpenWindow.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>")
	OpenWindow.document.write("</head>")
	OpenWindow.document.write("<frameset rows='50,1*' topmargin='0' leftmargin='0' marginwidth='0' marginheight='0' framespacing='0'>")
	OpenWindow.document.write(topURL_CALL)
	OpenWindow.document.write(bottomURL_CALL)
	OpenWindow.document.write("</frameset>")
	OpenWindow.document.write("</html>")

}

function openPopup(open_bottomURL,open_name,open_height,open_width,open_topURL) {
   windowFeatures = "width=" + open_width + ",height=" + open_height + ",toolbar=no,location=no,directories=no,status=no,menuBar=no,scrollBars=yes,resizable=yes";

   PopupWindow = window.open(open_bottomURL, open_name, windowFeatures);
}


var Nav4 = document.layers;
var IE4 = document.all;
 
if (Nav4)
{
	document.captureEvents(Event.KEYDOWN);
	document.captureEvents(Event.KEYPRESS);
	document.onkeydown  = keypressed;
	document.onkeypress = enterKey;
} else if (IE4) {
	document.onkeypress = enterKey;
}
 
function keypressed(key)
{
	if (Nav4)
	{
		keyPressed = String.fromCharCode(key.which);
	}

	if (keyPressed == "\r" || keyPressed == "\n" || keyPressed == "\r\n")
	{
		enterKey(key);
		return false;
	} else {
		return true;
	}
 
}
 
function enterKey(key)
{
 
	if (Nav4)
	{
		keyPressed = String.fromCharCode(key.which);
	} else if (IE4)
	{
		keyPressed = String.fromCharCode(window.event.keyCode);
	}
	 
	if ((keyPressed == "\r" || keyPressed == "\n" || keyPressed == "\r\n") &&
			(document.forms[0].username.value != "" &&
			document.forms[0].password.value != ""))
	{
			document.forms[0].step.value = '1';
			document.forms[0].submit();
			if(IE4) {event.keyCode = "";}
			return true;
	}
}


function MakeArray(n) {
	this.length = n
	return this
}
monthNames = new MakeArray(12)
monthNames[1] = "January"
monthNames[2] = "February"
monthNames[3] = "March"
monthNames[4] = "April"
monthNames[5] = "May"
monthNames[6] = "June"
monthNames[7] = "July"
monthNames[8] = "August"
monthNames[9] = "September"
monthNames[10] = "October"
monthNames[11] = "November"
monthNames[12] = "December"
dayNames = new MakeArray(7)
dayNames[1] = "Sunday"
dayNames[2] = "Monday"
dayNames[3] = "Tuesday"
dayNames[4] = "Wednesday"
dayNames[5] = "Thursday"
dayNames[6] = "Friday"
dayNames[7] = "Saturday"

function customDateString() {
	currentDate = new Date()
	var theDay = dayNames[currentDate.getDay() + 1]
	var theMonth = monthNames[currentDate.getMonth() + 1]
	msie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
	if (msie4) {
	    var theYear = currentDate.getYear()
	}
	else {
	     var theYear = currentDate.getYear() +1900
	}
	return theDay + ", " + theMonth + " " + currentDate.getDate() + ", " + theYear
}

//