if (document.images)
   {
	 
	 nav1on= new Image(143,23);
     nav1on.src="images/nav-mailbox-on.gif";  
     nav1off= new Image(143,23);
     nav1off.src="images/nav-mailbox.gif";
	 
	 nav2on= new Image(104,23);
     nav2on.src="images/nav-search-on.gif";  
     nav2off= new Image(104,23);
     nav2off.src="images/nav-search.gif";
	 
	 nav3on= new Image(146,23);
     nav3on.src="images/nav-favorites-on.gif";  
     nav3off= new Image(146,23);
     nav3off.src="images/nav-favorites.gif";
	 
	 nav4on= new Image(256,23);
     nav4on.src="images/nav-specials-on.gif";  
     nav4off= new Image(256,23);
     nav4off.src="images/nav-specials.gif";
	 
	 nav5on= new Image(148,23);
     nav5on.src="images/nav-account-on.gif";  
     nav5off= new Image(148,23);
     nav5off.src="images/nav-account.gif";
	 
	 nav6on= new Image(113,23);
     nav6on.src="images/nav-logooff-on.gif";  
     nav6off= new Image(113,23);
     nav6off.src="images/nav-logooff.gif";
	 
	 nav6aon= new Image(109,23);
     nav6aon.src="images/nav-logooff2-on.gif";  
     nav6aoff= new Image(109,23);
     nav6aoff.src="images/nav-logooff2.gif";
	 
	 nav7on= new Image(88,24);
     nav7on.src="images/toy-store-over.gif";  
     nav7off= new Image(88,24);
     nav7off.src="images/toy-store.gif";
	 
	 nav8on= new Image(88,24);
     nav8on.src="images/pay-per-view-over.gif";  
     nav8off= new Image(88,24);
     nav8off.src="images/pay-per-view.gif";
	 
	 nav9on= new Image(88,24);
     nav9on.src="images/model-cams-over.gif";  
     nav9off= new Image(88,24);
     nav9off.src="images/model-cams.gif";
	 
   }
   
function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_findObj(n, d) { //v3.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); return x;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function lightup(imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + "on.src");
      document[imgName].src= imgOn;
    }
 }

function turnoff(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
    }
 }
 
 function hideLayer(whichLayer) {

if (document.getElementById) {
// this is the way the standards work
document.getElementById(whichLayer).style.visibility = "hidden";
}
else if (document.all) {
// this is the way old msie versions work
document.all[whichlayer].style.visibility = "hidden";
}
else if (document.layers) {
// this is the way nn4 works
document.layers[whichLayer].visibility = "hidden";
}

}

function showLayer(whichLayer) {

if (document.getElementById) {
// this is the way the standards work
document.getElementById(whichLayer).style.visibility = "visible";
}
else if (document.all) {
// this is the way old msie versions work
document.all[whichlayer].style.visibility = "visible";
}
else if (document.layers) {
// this is the way nn4 works
document.layers[whichLayer].visibility = "visible";
}

}

function handleClick(whichClick,theLayer) {

if (whichClick == "hide it") {
// then the user wants to hide the layer
hideLayer(theLayer);

}
else if (whichClick == "show it") {
// then the user wants to show the layer
showLayer(theLayer);
}

}


function putMessage(error_message){
        alert(error_message);
        return false;   
}

function checkEmail(email){
        var email_string = email.value; 
        var at_position = email_string.indexOf('@'); 
        var dot_position = email_string.indexOf('.', at_position); 
        var extension = email_string.substring(dot_position+1,email_string.length); 
        
        if(at_position<0){
                return false; 
        } else if (dot_position<0){
                return false; 
        } else if (extension.length<=0){
                return false; 
        } 
        return true; 
}

function hasValue(obj, obj_type){
    if (obj_type == "TEXT" || obj_type == "PASSWORD"){
        if (obj.value.length == 0) 
                return false;
        else 
                return true;
    } else if (obj_type == "SINGLE_VALUE_RADIO" || obj_type == "SINGLE_VALUE_CHECKBOX") {
                if (obj.checked)
                        return true;
                else
                return false;   
        } else if (obj_type == "RADIO" || obj_type == "CHECKBOX") {
                for (i=0; i < obj.length; i++){
                        if (obj[i].checked)
                                return true;
                }
                return false;   
        } else  if (obj_type == "SELECT") {
                if (obj.selectedIndex == 0)
                        return false;
                else
                        return true;
        }
}

function hasValue2(obj1, obj2, obj3, obj4, obj5, obj6){
        var flag = 0;
        for (i=1; i < 7; i++){
                if (obj[i].checked)
                        flag = i;
                }
        if (flag == 0)
                return false;
        else
                return true;
}

function  checkFormContact(this_form){
    if  (!hasValue(this_form.gotf, "CHECKBOX" )) {
                if  (!putMessage("Please confirm you have read our terms and consitions")){
                        return false; 
                }
        }
        
        return true;    
}

function  checkFormUA(this_form){
	
	if  (!hasValue(this_form.old18, "CHECKBOX" )) {
                if  (!putMessage("You must be 18 years of age or older")){
                        return false; 
                }
        }
		
    if  (!hasValue(this_form.gotf, "CHECKBOX" )) {
                if  (!putMessage("Please confirm you have read our terms and consitions")){
                        return false; 
                }
        }
		
	
        
        return true;    
}

function  checkFormStep1(this_form){
    if  (!hasValue(this_form.account_type, "RADIO" )) {
                if  (!putMessage("Please select an account type")){
                        return false; 
                }
        }
        
        return true;    
}

function  checkForm(this_form){
	if  (!hasValue(this_form.firstname, "TEXT" )) {
                if  (!putMessage("Please enter your first name")){
                        return false; 
                }
        }
    if  (!hasValue(this_form.lastname, "TEXT" )) {
                if  (!putMessage("Please enter your last name")){
                        return false; 
                }
        }
	if  (!hasValue(this_form.address1, "TEXT" )) {
                if  (!putMessage("Please enter your address")){
                        return false; 
                }
        }
	if  (!hasValue(this_form.city, "TEXT" )) {
                if  (!putMessage("Please enter your city")){
                        return false; 
                }
        }
	if  (!hasValue(this_form.zip, "TEXT" )) {
                if  (!putMessage("Please enter your zip")){
                        return false; 
                }
        }
	if  (!hasValue(this_form.phone, "TEXT" )) {
                if  (!putMessage("Please enter your phone number")){
                        return false; 
                }
        }
    if  (!hasValue(this_form.email, "TEXT" )) {
                if  (!putMessage("Please enter your email address")){
                        return false; 
                }
        } else {
                if (!checkEmail(this_form.email)){
                        if  (!putMessage("Please enter valid email address")){
                                return false; 
                        }
                }
        }
	if  (!hasValue(this_form.cardname, "TEXT" )) {
                if  (!putMessage("Please enter the name on the credit card")){
                        return false; 
                }
        }
	if  (!hasValue(this_form.cardnumber, "TEXT" )) {
                if  (!putMessage("Please enter the credit card number")){
                        return false; 
                }
        }
	if  (!hasValue(this_form.cardsecurity, "TEXT" )) {
                if  (!putMessage("Please enter the credit card security code")){
                        return false; 
                }
        }
	if  (!hasValue(this_form.expmonth, "TEXT" )) {
                if  (!putMessage("Please enter the credit card expiration month")){
                        return false; 
                }
        }
	if  (!hasValue(this_form.expyear, "TEXT" )) {
                if  (!putMessage("Please enter the credit card expiration year")){
                        return false; 
                }
        }
        
        return true;    
}


function  checkForm2(this_form){
	if  (!hasValue(this_form.username, "TEXT" )) {
                if  (!putMessage("Please enter your username")){
                        return false; 
                }
        }
	if  (!hasValue(this_form.password, "TEXT" )) {
                if  (!putMessage("Please enter your password")){
                        return false; 
                }
        }
	if  (!hasValue(this_form.passwordR, "TEXT" )) {
                if  (!putMessage("Please re-type your password")){
                        return false; 
                }
        }
    if  (!hasValue(this_form.email, "TEXT" )) {
                if  (!putMessage("Please enter your email address")){
                        return false; 
                }
        } else {
                if (!checkEmail(this_form.email)){
                        if  (!putMessage("Please enter valid email address")){
                                return false; 
                        }
                }
        }
	if  (!hasValue(this_form.emailR, "TEXT" )) {
                if  (!putMessage("Please enter your email address")){
                        return false; 
                }
        } else {
                if (!checkEmail(this_form.emailR)){
                        if  (!putMessage("Please enter valid email address")){
                                return false; 
                        }
                }
        }
	  
}

function  checkForm3(this_form){

    if  (!hasValue(this_form.email, "TEXT" )) {
                if  (!putMessage("Please enter your email address")){
                        return false; 
                }
        } else {
                if (!checkEmail(this_form.email)){
                        if  (!putMessage("Please enter valid email address")){
                                return false; 
                        }
                }
        }
	  
}

function  checkForm4(this_form){


	if  (!hasValue(this_form.message, "TEXT" )) {
                if  (!putMessage("Please enter a message")){
                        return false; 
                }
        }
	  
}

function  checkForm5(this_form){

	if  (!hasValue(this_form.name, "TEXT" )) {
                if  (!putMessage("Please enter a subject")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.body, "TEXT" )) {
                if  (!putMessage("Please enter a message")){
                        return false; 
                }
        }
	  
}

function  checkForm6(this_form){

	if  (!hasValue(this_form.tMonth, "SELECT" )) {
                if  (!putMessage("Please enter the month of your birthday")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.tDay, "SELECT" )) {
                if  (!putMessage("Please enter the day of your birthday")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.tYear, "SELECT" )) {
                if  (!putMessage("Please enter the year of your birthday")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.height, "SELECT" )) {
                if  (!putMessage("Please enter your height")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.weight, "TEXT" )) {
                if  (!putMessage("Please enter your weight")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.waist, "SELECT" )) {
                if  (!putMessage("Please enter your waist")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.cock, "SELECT" )) {
                if  (!putMessage("Please enter the size of your cock")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.cut, "SELECT" )) {
                if  (!putMessage("Please enter if you are cut")){
                        return false; 
                }
        }
	
	if  (!hasValue(this_form.bodytype, "SELECT" )) {
                if  (!putMessage("Please enter your body type")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.bodyhair, "SELECT" )) {
                if  (!putMessage("Please enter your body hair")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.facialhair, "SELECT" )) {
                if  (!putMessage("Please enter your facial hair")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.ethnicity, "SELECT" )) {
                if  (!putMessage("Please enter your ethnicity")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.hair, "SELECT" )) {
                if  (!putMessage("Please enter your hair color")){
                        return false; 
                }
        }
		
	if  (!hasValue(this_form.eyes, "SELECT" )) {
                if  (!putMessage("Please enter your eye color")){
                        return false; 
                }
        }
	  
}
        
function  checkForm7(this_form){
		
	if  (!hasValue(this_form.positions, "SELECT" )) {
                if  (!putMessage("Please enter your position")){
                        return false; 
                }
        }
	  
}


 