bname = navigator.appName;
bversion = parseFloat(navigator.appVersion);

function resizeNS() {
if (bname == "Netscape") {window.location.reload();}
}


//Window Popper

function popWin(url,width,height,posx,posy) {
var myWindow = window.open(url, "mainWin", 'resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width='+width+',height='+height+',screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
myWindow.focus()
}


//rollover code

var base_dir = "http://www.lucidtranslations.com/images/";
var imgs = new Array('home_ourrates1_on.gif','companyp1_on.gif','contact1_on.gif','back_home_on.gif','support_submit1_on.gif','support_cd1_on.gif','support_ourrates1_on.gif','support_contact1_on.gif','courses1_on.gif','support_products_on.gif','support_courses1_on.gif','custom_jewelry.gif','support_custom_jewelry_on.gif');
       for (var i=0; i < imgs.length; i++) {
       var img = new Image();
       img.src = base_dir + imgs[i];
       }
function rollover(name1,img1){
	if (bname == "Netscape") {
		if (bversion < 5) {
			return false;
			}
		}
	if (bname == "Netscape") {
		if (bversion >= 5) {
			document.images[name1].src = base_dir + img1;
			}
		}
		else{
             document.images[name1].src = base_dir + img1;
             }
	}
	
	
// validator

function VF(f, msg){
        if (f.value == ""){
                alert(msg);
                f.focus();
                return (false);
        }
        return(true);
}

function FormValidator1(theForm){
        if (!VF(Input_Form.Name, "Please enter your name.")) {return(false);}
		if (!VF(Input_Form.Email, "Please enter your email address.")) {return(false);}
		if (!VF(Input_Form.Message, "Please enter your comments.")) {return(false);}
}

function validEmail(mail) {
	invalidChars = " /:,;~`!#$%^&*()-+={}[]|><?"
	
	if (mail == "") {
	return (false);
	}
	
	for (i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i)
		if (mail.indexOf(badChar,0) > -1) {
			return false;
		}
	}
	atPos = mail.indexOf("@",1)
	if (atPos == -1) {
	return (false);
	}
	if (mail.indexOf("@",atPos+1) != -1) {
	return (false);
	}
	periodPos = mail.indexOf(".",atPos+2)
	if (periodPos == -1) {
	return (false);
	}
	if (periodPos+3 > mail.length)	{
	return (false);
	}
	return (true);
}

function FormValidator2(theForm){
		if (!VF(theForm.contact_first_name, "Please enter your \"First Name\".")) {return (false);}
		if (!VF(theForm.contact_last_name, "Please enter your \"Last Name\".")) {return (false);}
		if (!VF(theForm.email, "Please enter your \"Email\".")) {return (false);}
		if (!validEmail(theForm.email.value)) {
			alert("Invalid email Address");
			theForm.email.focus();
			theForm.email.select();
			return (false);
		}
}


function FormValidator3(theForm){
		if (!VF(theForm.name, "Please enter your name.")) {return (false);}
		if (!VF(theForm.address, "Please enter your address.")) {return (false);}
		if (!VF(theForm.phone, "Please enter your phone number.")) {return (false);}
		if (!VF(theForm.email, "Please enter your email address")) {return (false);}
		if (!validEmail(theForm.email.value)) {
			alert("Invalid email Address");
			theForm.email.focus();
			theForm.email.select();
			return (false);
		}
}