<!--

function openwindow(p,w,h) {
	w += 20; h += 25;
	window.open(p,'popup','height='+h+',width='+w+',dependent=yes,titlebar=yes,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,hotkeys=yes');
}

function validateForm(form) {  
	if ((form.NAME.value == "") || (form.COUNTRY.value == "") || (form.EMAIL.value == "") || (form.MESSAGE.value == "")) {
		alert("You have not completed all the fields.");
		return false;
	}
	else {
		if (validateEmail(form,form.EMAIL.value)) return(true);	
		else return(false);	
	}
}

function validateEmail(form,email) {
	var validEmail = false;
	var emailString = email; 
	var addressIsValid = false; 
	var invalidPatterns = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; 
	var validPatterns = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; 
	if (window.RegExp) { 
		if (!invalidPatterns.test(emailString) && validPatterns.test(emailString)) { 
			addressIsValid = true; 
		} 
		else { 
			addressIsValid = false; 
		} 
	}
	else { 
		if(emailString.indexOf("@") >= 0) 
			addressIsValid = true; 
	} 
	if (!addressIsValid) { 
		alert("\"The address " + emailString + "\" is not a valid e-mail.");  
	} 
      	return addressIsValid; 
} 



function img(id,name){
     if (document.images){
       if (document.images[id]){document.images[id].src=eval(name+".src");
       } else {
         if (document.layers){ 
           for (i=0; i < document.layers.length; i++) {
             if (document.layers[i].document.images[id]) {
             document.layers[i].document.images[id].src=eval(name+".src");
             break;
             }
           }
         }
       }
     }
   }

var layerRef="", styleSwitch="";

function show(object) {
    if (document.getElementById && document.getElementById(object) != null)
         node = document.getElementById(object).style.visibility='visible';
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'visible';
    else if (document.all)
        document.all[object].style.visibility = 'visible';
}

function hide(object) {
    if (document.getElementById && document.getElementById(object) != null)
         node = document.getElementById(object).style.visibility='hidden';
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'hidden';
    else if (document.all)
         document.all[object].style.visibility = 'hidden';
}


function hideall()
{
hide('light01');hide('light02');hide('light03');hide('light04');hide('light05');hide('light06');
}

function openWin(url,width,height) {
	var newWindow = window.open(url,"Phaethon2004","height="+height+",width="+width+",scrollbars=yes,toolbars=no,titlebar=no,resizable=yes");
}	

function ViewImage(ifile,ix,iy,ititle) {
	var win; 
	win = window.open('','_blank',"'width="+ix+",height="+(iy+25)+",menubar=no,toolbar=no,resizable=no,scrollbars=yes'");
	win.document.open();
	win.document.write("<html><head><title>"+ititle+"</title><script language=\"javascript\">window.resizeTo("+ix+","+(iy+25)+");</script></head><body bgcolor=White Background="+ifile+"></body></html>");
	win.document.close();
}

//-->