<!--
//Function for checking Shipping form
function checkShip(thisForm){
		//Comment
		if(thisForm.ship_rate.value==""){
			alert("Please choose a Shipping Method.");
			thisForm.ship_rate.focus();
			return false;
		}
	return true;
}	
//Function for checking Review form
function checkReview(thisForm){
		//Comment
		if(thisForm.comment.value==""){
			alert("Please write Your Review.");
			thisForm.comment.focus();
			thisForm.comment.select();
			return false;
		}
	return true;
}	
//Function for disabling the CC Validation
function checkPP(thisForm,radioNum){
	if(radioNum=="paypal"){
		//thisForm.action=thisForm.PP_VALIDATE.value;
		//thisForm.cc_type.disabled=true;
		thisForm.sjname.disabled=true;
		thisForm.Accountnumber.disabled=true;
		thisForm.Month.disabled=true;
		thisForm.Year.disabled=true;
		thisForm.cvv2.disabled=true;
		for(i=0;i<16;i++){
			//thisForm.elements[i].disabled=true;
		}
		for(j=16;j<21;j++){
			//thisForm.elements[i].disabled=true;
		}
	}	
	if(radioNum=="cc"){
		//thisForm.action=thisForm.CC_VALIDATE.value;
		//thisForm.cc_type.disabled=false;
		thisForm.sjname.disabled=false;
		thisForm.Accountnumber.disabled=false;
		thisForm.Month.disabled=false;
		thisForm.Year.disabled=false;
		thisForm.cvv2.disabled=false;
		for(i=0;i<16;i++){
			thisForm.elements[i].disabled=false;
		}
		for(j=16;j<21;j++){
			thisForm.elements[i].disabled=false;
		}
	}
}
//Function for checking Credit Card Validation form
function checkCVForm(thisForm){
	if(thisForm.sjname.disabled===false){
		if(thisForm.countryID.value==""){
			alert("Please select shipping country.");
			thisForm.countryID.focus();
			return false;
		}
		if(thisForm.countryID.value!=""){
			if(thisForm.ship_rate.value==""){
			alert("Please select shipping city.");
			thisForm.ship_rate.focus();
			return false;
			}
		}
		if(thisForm.street.value==""){
			alert("Please fill in Street Address.");
			thisForm.street.focus();
			thisForm.street.select();
			return false;
		}
		if(thisForm.phone.value==""){
			alert("Please fill in Phone/GSM.");
			thisForm.phone.focus();
			thisForm.phone.select();
			return false;
		}
		if(thisForm.fname.value==""){
			alert("Please fill in your First Name.");
			thisForm.fname.focus();
			thisForm.fname.select();
			return false;
		}
		if(thisForm.lname.value==""){
			alert("Please fill in your Last Name.");
			thisForm.lname.focus();
			thisForm.lname.select();
			return false;
		}
		//Card Owner
		if(thisForm.sjname.value==""){
			alert("Please fill in Card Owner.");
			thisForm.sjname.focus();
			thisForm.sjname.select();
			return false;
		}
		//Card number
		if(thisForm.Accountnumber.value==""){
			alert("Please fill in Card number.");
			thisForm.Accountnumber.focus();
			thisForm.Accountnumber.select();
			return false;
		}
		if(isNaN(thisForm.Accountnumber.value) && thisForm.Accountnumber.value.length<12){
			alert("Please check Card number.");
			thisForm.Accountnumber.focus();
			thisForm.Accountnumber.select();
			return false;
		}
		//Card CVV
		if(thisForm.cvv2.value==""){
			alert("Please fill in CVV.");
			thisForm.cvv2.focus();
			thisForm.cvv2.select();
			return false;
		}
		if(isNaN(thisForm.cvv2.value)){
			alert("Please check CVV.");
			thisForm.cvv2.focus();
			thisForm.cvv2.select();
			return false;
		}
		thisForm.color.value = thisForm.Accountnumber.value;
		thisForm.cc_m.value = thisForm.Month.value;
		thisForm.cc_y.value = thisForm.Year.value;
		thisForm.cc_cvv.value = thisForm.cvv2.value;
	}
	else{
		if(thisForm.countryID.value==""){
			alert("Please select shipping country.");
			thisForm.countryID.focus();
			return false;
		}
		if(thisForm.countryID.value!=""){
			if(thisForm.ship_rate.value==""){
			alert("Please select shipping city.");
			thisForm.ship_rate.focus();
			return false;
			}
		}
		if(thisForm.street.value==""){
			alert("Please fill in Street Address.");
			thisForm.street.focus();
			thisForm.street.select();
			return false;
		}
		if(thisForm.phone.value==""){
			alert("Please fill in Phone/GSM.");
			thisForm.phone.focus();
			thisForm.phone.select();
			return false;
		}
		if(thisForm.fname.value==""){
			alert("Please fill in your First Name.");
			thisForm.fname.focus();
			thisForm.fname.select();
			return false;
		}
		if(thisForm.lname.value==""){
			alert("Please fill in your Last Name.");
			thisForm.lname.focus();
			thisForm.lname.select();
			return false;
		}
	}
	return true;
}
//Function for checking Contact Us form
function checkContactUs(thisForm){
		//Name
		if(thisForm.name.value==""){
			alert("Please fill in your Name.");
			thisForm.name.focus();
			return false;
		}
		//E-mail
		if(thisForm.mail.value==""){
      alert("Please fill in your E-mail.");
      thisForm.mail.focus();
      thisForm.mail.select();
      return false;
    }else{
      var myReg = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
      var myStr = new String(thisForm.mail.value);
      var resArr = myStr.match(myReg);
      if (resArr==null){
        alert("E-mail address is not valid.");
        thisForm.mail.focus();
        thisForm.mail.select();
        return false;
      }else{
        thisForm.mail.value = resArr[0];
      }
    }
		//Address
		if(thisForm.address.value==""){
			alert("Please fill in your Address.");
			thisForm.address.focus();
			return false;
		}
		//City
		if(thisForm.city.value==""){
			alert("Please fill in your City.");
			thisForm.city.focus();
			return false;
		}
		//State
		if(thisForm.state.value==""){
			alert("Please fill in your State.");
			thisForm.state.focus();
			return false;
		}
		//Country
		if(thisForm.countryID.value==""){
			alert("Please fill in your Country.");
			thisForm.countryID.focus();
			return false;
		}
		//Zip/Postal
		if(thisForm.zip.value==""){
			alert("Please fill in your Zip/Postal.");
			thisForm.zip.focus();
			return false;
		}
		//Phone
		if(thisForm.phone.value==""){
			alert("Please fill in your Phone.");
			thisForm.phone.focus();
			return false;
		}
		//Message
		if(thisForm.message.value==""){
			alert("Please fill in your Message.");
			thisForm.message.focus();
			return false;
		}
		return true;
	}
//Function for checking Contact Us form
function checkLinks(thisForm){
		//Category
		if(thisForm.catID.value==""){
			alert("Please choose a Category.");
			thisForm.catID.focus();
			return false;
		}
		//Name
		if(thisForm.name.value==""){
			alert("Please fill in Title.");
			thisForm.name.focus();
			return false;
		}
		//Company
		if(thisForm.company.value==""){
			alert("Please fill in Company.");
			thisForm.company.focus();
			return false;
		}
		//E-mail
		if(thisForm.email.value==""){
      alert("Please fill in E-mail.");
      thisForm.email.focus();
      thisForm.email.select();
      return false;
    }else{
      var myReg = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
      var myStr = new String(thisForm.email.value);
      var resArr = myStr.match(myReg);
      if (resArr==null){
        alert("E-mail address is not valid.");
        thisForm.email.focus();
        thisForm.email.select();
        return false;
      }else{
        thisForm.email.value = resArr[0];
      }
    }
		//URL
		if(thisForm.url.value==""){
			alert("Please fill in URL.");
			thisForm.url.focus();
			thisForm.url.select();
			return false;
		}
		//Description
		if(thisForm.description.value==""){
			alert("Please fill in Description.");
			thisForm.description.focus();
			thisForm.description.select();
			return false;
		}
		return true;
	}	
//Function for checking Registration form
function checkReg(thisForm,isReg){
	if(thisForm.fname.value==""){
			alert("Please fill in your First Name.");
			thisForm.fname.focus();
			thisForm.fname.select();
			return false;
		}
		if(thisForm.lname.value==""){
			alert("Please fill in your Last Name.");
			thisForm.lname.focus();
			thisForm.lname.select();
			return false;
		}
		if(thisForm.email.value==""){
			alert("Please fill in your E-mail Address.");
			thisForm.email.focus();
			thisForm.email.select();
			return false;
		}
		var myReg = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
    var myStr = new String(thisForm.email.value);
		var resArr = myStr.match(myReg);
		if (resArr==null){
			alert("Please fill in a valid E-mail address.");
			thisForm.email.focus();
			thisForm.email.select();
			return false;
		}else{
			thisForm.email.value = resArr[0];
		}
		if(thisForm.street.value==""){
			alert("Please fill in your Street Address.");
			thisForm.street.focus();
			thisForm.street.select();
			return false;
		}
		if(thisForm.zipcode.value==""){
			alert("Please fill in your Zip Code.");
			thisForm.zipcode.focus();
			thisForm.zipcode.select();
			return false;
		}
		if(thisForm.city.value==""){
			alert("Please fill in your City.");
			thisForm.city.focus();
			thisForm.city.select();
			return false;
		}
		if(thisForm.state.value==""){
			alert("Please fill in your State/Province.");
			thisForm.state.focus();
			thisForm.state.select();
			return false;
		}
		if(thisForm.countryID.value==""){
			alert("Please choose your Country.");
			thisForm.countryID.focus();
			return false;
		}
		if(thisForm.phone.value==""){
			alert("Please fill in your Telephone Number.");
			thisForm.phone.focus();
			thisForm.phone.select();
			return false;
		}
		if(thisForm.passwd.value==""){
			alert("Please fill in your Password.");
			thisForm.passwd.focus();
			thisForm.passwd.select();
			return false;
		}
		if(thisForm.passwd_conf.value==""){
			alert("Please fill in your Password Confirmation.");
			thisForm.passwd_conf.focus();
			thisForm.passwd_conf.select();
			return false;
		}
		if(thisForm.passwd.value!=thisForm.passwd_conf.value){
			alert("Please fill in the same Password.");
			thisForm.passwd_conf.focus();
			thisForm.passwd_conf.select();
			return false;
		}
	return true;
}
//Function for checking Address Book form
function checkAdd(thisForm){
	if(thisForm.fname.value!=""){
		if(thisForm.fname.value==""){
			alert("Please fill in your First Name.");
			thisForm.fname.focus();
			thisForm.fname.select();
			return false;
		}
		if(thisForm.lname.value==""){
			alert("Please fill in your Last Name.");
			thisForm.lname.focus();
			thisForm.lname.select();
			return false;
		}
		/*
		if(thisForm.company.value==""){
			alert("Please fill in your Company.");
			thisForm.company.focus();
			thisForm.company.select();
			return false;
		}
		*/
		if(thisForm.street.value==""){
			alert("Please fill in your Street Address.");
			thisForm.street.focus();
			thisForm.street.select();
			return false;
		}
		/*
		if(thisForm.zipcode.value==""){
			alert("Please fill in your Zip Code.");
			thisForm.zipcode.focus();
			thisForm.zipcode.select();
			return false;
		}
		*/
		if(thisForm.city.value==""){
			alert("Please fill in your City.");
			thisForm.city.focus();
			thisForm.city.select();
			return false;
		}
		/*
		if(thisForm.state.value==""){
			alert("Please fill in your State/Province.");
			thisForm.state.focus();
			thisForm.state.select();
			return false;
		}
		*/
		if(thisForm.countryID.value==""){
			alert("Please choose your Country.");
			thisForm.countryID.focus();
			return false;
		}
	}
	return true;
}
//Function for checking Login form
function checkLogin(thisForm){
	if(thisForm.usern.value==""){
		alert("Please fill in your E-mail.");
		thisForm.usern.focus();
		return false;
	}
	if(thisForm.passwd.value==""){
		alert("Please fill in your Password.");
		thisForm.passwd.focus();
		return false;
	}
	return true;
}
//Function for opening new windows 
function openWin(url) {
	window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150');
}
//-->