﻿ // JScript File
	var RollImages=new Array()
	RollImages [0]=new Image(125,25)
	RollImages [1]=new Image(125,25)
	RollImages [2]=new Image(125,25)
	RollImages [3]=new Image(125,25)
	RollImages [4]=new Image(125,25)
	RollImages [5]=new Image(125,25)
	RollImages [6]=new Image(125,25)
	RollImages [7]=new Image(125,25)
	RollImages [8]=new Image(125,25)
	RollImages [9]=new Image(125,25)
	RollImages [10]=new Image(125,25)
	RollImages [11]=new Image(125,25)
	
	RollImages [0].src="Display/SiteImages/FreePics.jpg"
	RollImages [1].src="Display/SiteImages/FreePicsButton.jpg"
	RollImages [2].src="Display/SiteImages/FreePicsReg.jpg"
	RollImages [3].src="Display/SiteImages/VideoClips.jpg"
	RollImages [4].src="Display/SiteImages/VideoClipsButton.jpg"
	RollImages [5].src="Display/SiteImages/VideoClipsReg.jpg"
	RollImages [6].src="Display/SiteImages/FreeClick.jpg"
	RollImages [7].src="Display/SiteImages/JoinClick.jpg"
	RollImages [8].src="Display/SiteImages/MembersClick.jpg"
	RollImages [9].src="Display/SiteImages/Continue.jpg"
	RollImages [10].src="Display/SiteImages/ContinueOver.jpg"
	RollImages [11].src="Display/SiteImages/ContinueClick.jpg"


	function Swap(sSource,sImage){
		sSource.src=sImage ;
		return true;
	}
	function Redirect(s){
		if(s=='T'){
			window.location="TourGuide.asp"
		
		}
	}


var pic_width=125;
var pic_height=100;
var pic2_width=125;
var pic2_height=70;

if (document.images)
 {
     pic1= new Image(pic_width,pic_height);
     pic1.src="Display/SiteImages/Flip1.jpg";  
     pic2= new Image(pic_width,pic_height); 
     pic2.src="Display/SiteImages/Flip2.jpg"; 
     pic3= new Image(pic_width,pic_height);
     pic3.src="Display/SiteImages/Flip3.jpg";  
     pic4= new Image(pic_width,pic_height);
     pic4.src="Display/SiteImages/Flip4.jpg";  
     pic5= new Image(pic_width,pic_height);
     pic5.src="Display/SiteImages/Flip5.jpg"; 
     
     
     picBottom1= new Image(pic2_width,pic2_height);
     picBottom1.src="Display/SiteImages/WebCams.jpg";  
     picBottom2= new Image(pic2_width,pic2_height); 
     picBottom2.src="Display/SiteImages/Updates.jpg"; 
     picBottom3= new Image(pic2_width,pic2_height);
     picBottom3.src="Display/SiteImages/Gallery.jpg";  
     picBottom4= new Image(pic2_width,pic2_height);
     picBottom4.src="Display/SiteImages/Lesbian.jpg";  
     picBottom5= new Image(pic2_width,pic2_height);
     picBottom5.src="Display/SiteImages/Anal.jpg"; 
     picBottom6= new Image(pic2_width,pic2_height);
     picBottom6.src="Display/SiteImages/Bj.jpg"; 
     picBottom7= new Image(pic2_width,pic2_height);
     picBottom7.src="Display/SiteImages/variety.jpg"; 
     picBottom8= new Image(pic2_width,pic2_height);
     picBottom8.src="Display/SiteImages/link.jpg"; 
     picBottom9= new Image(pic2_width,pic2_height);
     picBottom9.src="Display/SiteImages/video.jpg"; 
	 picBottom10= new Image(pic2_width,pic2_height);
     picBottom10.src="Display/SiteImages/DVDs.jpg"; 
 }    


var pics= new Array(5) 
    pics[0]=pic1.src;
    pics[1]=pic2.src;
    pics[2]=pic3.src;
    pics[3]=pic4.src;
    pics[4]=pic5.src; 
    
var picbottom= new Array(2)   
    picbottom[0]=picBottom1.src;
    picbottom[1]=picBottom2.src; 
    picbottom[2]=picBottom3.src; 
    picbottom[3]=picBottom4.src; 
    picbottom[4]=picBottom5.src; 
    picbottom[5]=picBottom6.src; 
    picbottom[6]=picBottom7.src; 
    picbottom[7]=picBottom8.src; 
    picbottom[8]=picBottom9.src;
    picbottom[9]=picBottom10.src; 
	var numpics=5;
	var thenum=0;
	imgName="img1";
	var numpicsb=10;
	var thenumb=0;
	imgbottom="img2";

function change_it()
 {
   if (document.images)
    {
      document.write("<IMG SRC='"+pics[thenum]+"' border='0' width='"+pic_width+"' height='"+pic_height+"' name='img1'>\n");
      setTimeout('change_it2()',4000);  
   }
}

	function change_it2() {
	    var x=0;
	    thenum+=1;
	      if (thenum>numpics-1)
	        thenum=0;
			document[imgName].src=pics[thenum];
			x+=1;
			setTimeout('change_it2()',4000);
	 }
 
	function change_bottom() {
		   if (document.images)
		    {
		      document.write("<IMG SRC='"+picbottom[thenumb]+"' border='0' width='"+pic2_width+"' height='"+pic2_height+"' name='img2'>\n");
		      setTimeout('change_bottom2()',2000);  
		   }
		}

		function change_bottom2()
		 {
		    var x=0;
		    thenumb+=1;
		      if (thenumb>numpicsb-1)
		        thenumb=0;
		      document[imgbottom].src=picbottom[thenumb];
		      x+=1;
		      setTimeout('change_bottom2()',2000);
		          
		 }

function PopUp(URL,sVideo) {
  photoWin = window.open( URL, "photo",
     "width=375px,height=375px,status,scrollbars,resizable,screenX=20,screenY=40,left=20,top=40");
// If we are on NetScape, we can bring the window to the front
	if (navigator.appName.substring(0,8) =="Netscape")  {
	photoWin.focus();
	}
	if (sVideo) {
	photoWin.document.write
	
	}
}


function GetMediaPlayer(Path,Width,Height) {
// etc for other cases:
// 4=Scan Forward, 5=Scan Back, 6=Buffering, 7=Waiting
// 8=Media Ended, 9=Transitioning, 10=Ready,
//11=Reconnecting
    var Tmp='' ;
//        Tmp='<script FOR="mediaPlayer" EVENT="PlayStateChange(state)">' + 
//           ' switch (state){ ' + 
//            ' case 1: ' + 
//             ' alert("Stopped");' + 
//             ' break; ' + 
//            ' case 2: ' + 
//            ' alert("Paused"); ' + 
//            ' break; ' + 
//            ' case 3: ' + 
//            ' alert("Playing"); ' + 
//            ' break; ' + 
//            ' // etc for other cases:  ' + 
//            ' // 4=Scan Forward, 5=Scan Back, 6=Buffering, 7=Waiting ' + 
//            ' // 8=Media Ended, 9=Transitioning, 10=Ready, 11=Reconnecting ' + 
//         ' }	 ' + 
//         ' </script><br> '




	 Tmp+= "<object id='mediaPlayer' width='" + Width + "' height='" + Height + "'" +
	  "classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'" +
      "codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715 '" +
      "standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>" +
      "<param name='fileName' value='" + Path + "'>" +
      "<param name='animationatStart' value='true'>" +
      "<param name='transparentatStart' value='false'>" + 
      "<param name='autoStart' value='true'>" +
      "<param name='showControls' value='true'>" +
      "<PARAM NAME='SendPlayStateChangeEvents' VALUE='True'>" +
      "<param name='ShowStatusBar' value='true'>" +
      "<param name='loop' value='0'>" +
      "<PARAM name='uiMode' value='mini'>" + 
      "<param name='autoRewind' value='false'>" +
      "<embed type='application/x-mplayer2'" +
	  " pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'" +
	  " src='" + Path + "'  width='" + Width + "' height='"  + Height + "'" +
	  " autostart='1'" +
	  " displaysize='4'" + 
	  " autosize='1'" +
	  " bgcolor='darkblue'"  +
	  " showcontrols='1'"  +
	  " showtracker='1'" +
	  " showstatusbar='1'" +
	  " showdisplay='1'" +
	  " videoborder3d='1'" +
	  " designtimesp='5311'" +
	  " loop='0'>" +
	  "</embed>" +
      "</object>" ;
	 return Tmp ;
   
 
}


    function GetQuickTime(Path,Width,Height) {
        var Tmp ='';
  
        Tmp ='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"' + 
        'width="' + Width + '" height="' + Height + '"' +
        'codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" ' +
        'align="middle" >' +
        '<param name="src" value="' + Path + '" /> ' +
        '<param name="LOOP" value="FALSE" />'+
        '<param name="controller" value="true" />'+
        '<param name="KIOSKMODE" value="false" />' +
        '<param name="SHOWCONTROLS" value="1" />' +
        '<param name="AUTOPLAY" value="TRUE" />' +
        '<param name="bgcolor" value="black" />' +
        '<param name="PLAYEVERYFRAME" value="false" />' +
        '<param name="ENABLEJAVASCRIPT" value="TRUE" />' +
        '<embed src="' + Path + '" width="' + Width + '" height="' + Height + '" controller="true" kioskmode="false"' +
         'pluginspage=http://www.apple.com/quicktime/download/' + 
        'align="center" autoplay="true" bgcolor="black" SHOWCONTROLS="1" ENABLEJAVASCRIPT="true" PLAYEVERYFRAME="false" > </embed></object>' ;
         return Tmp
  

}

//function GetFlashObject(Path,Height,Width,VideoId) {
//var Tmp ='';

//          Tmp="<div align='center'> " +
//          "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' " +
//          "width='" + Width + "' height='" + Height + "' align='middle'>" +
//          "<param name='movie' value='Display/VideoGallery/AnyFlvPlayer.swf' /> " +
//          "<param name='FlashVars' value='flvURL=http://www.thebeaverfarm.com/" + Path + "&ControlPanelColor=0x000000&buttonColor=0x808080&ControlPanelPosition=0&showControlPanel=1&ShowtimeColor=0xffffff&bAutoPlay=1&bAutoRepeat=0&BufferTime=5&tmeColor=0xffffff&loaColor=0xc0c0c0&GroundColor=0xfffbf0&conNum=5&bShowtime=1&startvolume=100' />" +
//          "<param name='quality' value='high' />" +
//          "<param name='bgcolor' value='#000000' /> " +
//          "<param name='scale' value='noscale' />" +
//          "<param name='allowfullscreen' value='true' />" +
//          "<param name='allowScriptAccess' value='always' />" + 
//          "<param name='salign' value='lt' />" +
//          "<embed src='Display/VideoGallery/AnyFlvPlayer.swf' width='" + Width + "' height='" + Height + "' align='middle' quality='high' bgcolor='#000000'" +
//          "scale='noscale' salign='lt' flashvars='flvURL=http://www.thebeaverfarm.com/" + Path + "&ControlPanelColor=0x000000&buttonColor=0x808080&ControlPanelPosition=0&showControlPanel=1&ShowtimeColor=0xffffff&bAutoPlay=1&bAutoRepeat=0&BufferTime=5&tmeColor=0xffffff&loaColor=0xc0c0c0&GroundColor=0xfffbf0&conNum=5&bShowtime=1&startvolume=100'" +
//          "allowfullscreen='true' allowscriptaccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />" +
//          "</object>" +
//          "</div>"
//     return Tmp ;

//}


function GetFlashObject(Path,Height,Width,VideoId) {
var Tmp ='';

          Tmp="<div align='center'> " +
          "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' " +
          "width='" + Width + "' height='" + Height + "' align='middle'>" +
          "<param name='movie' value='http://www.thebeaverfarm.com/Display/VideoGallery/AnyFlvPlayer.swf' /> " +
          "<param name='FlashVars' value='flvURL=" + Path + "&ControlPanelColor=0x000000&buttonColor=0x808080&ControlPanelPosition=0&showControlPanel=1&ShowtimeColor=0xffffff&bAutoPlay=1&bAutoRepeat=0&BufferTime=5&tmeColor=0xffffff&loaColor=0xc0c0c0&GroundColor=0xfffbf0&conNum=5&bShowtime=1&startvolume=100' />" +
          "<param name='quality' value='high' />" +
          "<param name='bgcolor' value='#000000' /> " +
          "<param name='scale' value='noscale' />" +
          "<param name='allowfullscreen' value='true' />" +
          "<param name='allowScriptAccess' value='always' />" + 
          "<param name='salign' value='lt' />" +
          "<embed src='http://www.thebeaverfarm.com/Display/VideoGallery/AnyFlvPlayer.swf' width='" + Width + "' height='" + Height + "' align='middle' quality='high' bgcolor='#000000'" +
          "scale='noscale' salign='lt' flashvars='flvURL=" + Path + "&ControlPanelColor=0x000000&buttonColor=0x808080&ControlPanelPosition=0&showControlPanel=1&ShowtimeColor=0xffffff&bAutoPlay=1&bAutoRepeat=0&BufferTime=5&tmeColor=0xffffff&loaColor=0xc0c0c0&GroundColor=0xfffbf0&conNum=5&bShowtime=1&startvolume=100'" +
          "allowfullscreen='true' allowscriptaccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />" +
          "</object>" +
          "</div>"
     return Tmp ;

}


function GetFlashObject2(Path, Height, Width, VideoId) {
    var Tmp = '';

    Tmp = "<div align='center'> " +
          "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' " +
          "width='" + Width + "' height='" + Height + "' align='middle'>" +
          "<param name='movie' value='Display/Clips/AnyFlvPlayer.swf' /> " +
          "<param name='FlashVars' value='flvURL=" + Path + "&ControlPanelColor=0x000000&buttonColor=0x808080&ControlPanelPosition=0&showControlPanel=1&ShowtimeColor=0xffffff&bAutoPlay=1&bAutoRepeat=0&BufferTime=5&tmeColor=0xffffff&loaColor=0xc0c0c0&GroundColor=0xfffbf0&conNum=5&bShowtime=1&startvolume=100' />" +
          "<param name='quality' value='high' />" +
          "<param name='bgcolor' value='#000000' /> " +
          "<param name='scale' value='noscale' />" +
          "<param name='allowfullscreen' value='true' />" +
          "<param name='allowScriptAccess' value='always' />" +
          "<param name='salign' value='lt' />" +
          "<embed src='Display/Clips/AnyFlvPlayer.swf' width='" + Width + "' height='" + Height + "' align='middle' quality='high' bgcolor='#000000'" +
          "scale='noscale' salign='lt' flashvars='flvURL=" + Path + "&ControlPanelColor=0x000000&buttonColor=0x808080&ControlPanelPosition=0&showControlPanel=1&ShowtimeColor=0xffffff&bAutoPlay=1&bAutoRepeat=0&BufferTime=5&tmeColor=0xffffff&loaColor=0xc0c0c0&GroundColor=0xfffbf0&conNum=5&bShowtime=1&startvolume=100'" +
          "allowfullscreen='true' allowscriptaccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />" +
          "</object>" +
          "</div>"
    return Tmp;

}




function GetNoPlugIn() {
    var Tmp ='';
    Tmp="This video requires either windows media player or quicktime.<br> you can download them here<br>" +
    "<a href='http://www.apple.com/quicktime/download/'>Quick Time</a><br>" +
    "<a href='http://microsoft.com/windows/mediaplayer/en/download/'>Windows Media Player</a><br>" ;
    return Tmp ;
}


function GetFlashPlugin() {
    var Tmp ='';
    Tmp="This video requires Flash Player.<br> you can download it here<br>" +
    "<a href='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BUIGP'>Flash Player</a><br>" ;
    return Tmp ;
}


function testEmail(src) {
    var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
	if (! src.match(re)) {
		return (false);
	}else {
		return(true);
	}
}


function validateDate(Item) {
		var Excluded = "\:\-\[a-z]\[A-Z]" ;
		var RegExPattern = /^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$/;
	   // var errorMessage = 'Please enter valid date as month, day, and four digit year.\nFormat mm/dd/yyyy';
	    if(Item=='undefined' || isWhiteSpace(Item.value)) {
				return true ;
		}
		
		for (i = 0; i < Item.value.length; i++) {
	        var c = Item.value.charAt(i);
	        if (Excluded.indexOf(c) > -1) {
				alert('please enter a valid date.');
				Item.value='';
				Item.focus();
				return false ;
	        }
		}
	    if ((Item.value.match(RegExPattern)) && (Item.value!='')) {
	        return true;
	    } else {
				alert('please enter a valid date.');
				Item.value='';
				Item.focus();
				return false ;
	    } 
	}


function CheckSignUp() {
		var Email='';
		var ConfirmEmail='';
		var msg='';
		
		try {
			Email=document.getElementById("Email");
			ConfirmEmail=document.getElementById("ConfirmEmail");

			if (Email=='undefined' || Email.value.length==0 || Email==null || isWhiteSpace(Email.value)) {
					msg+= "Email\n";
			}else {
				if(!testEmail(Email.value)) {
					msg+="valid email address\n";
				}
			}
			if (ConfirmEmail=='undefined' || ConfirmEmail.value.length==0 || ConfirmEmail==null || isWhiteSpace(ConfirmEmail.value)) {
					msg+= "Confirm Email\n";
			}else {
				if(!testEmail(ConfirmEmail.value)) {
					msg+="confirm email address appears invalid\n";
				}
			}
			
			if(msg.length <= 0) {
				if(Email.value.toLowerCase() != ConfirmEmail.value.toLowerCase()) {
					msg+="email address and confirm email address do not match\n";
				}
			}
			if(msg.length > 0) {
				alert("Please enter the following\n" + msg);
				return false;
			}else {
				return true;
			}
	} catch(e) {
		alert("Javascript Error\n" + e.description);
		return false ;
	}
}


function isWhiteSpace(s) {
		 var whitespace = " \t\n\r" ;
		 var x='';
		 for (i = 0; i < s.length; i++) {
            var c = s.charAt(i);
            if (whitespace.indexOf(c) == -1) 
            {
				x +=c
			}
		}
		return x.length==0
         
}
	
function CheckLogin() {
	try {
			UserName=document.getElementById("RightMenu1_MemberEmail");

			if (UserName=='undefined' || UserName.value.length==0 || UserName==null || isWhiteSpace(UserName.value)) {
					alert("An Email Address is required to login in");
					return false;
			}else {
				return true ;
			}
			
	} catch(e) {
		alert("Javascript Error\n" + e.description);
		return false ;
	}
}