var browser=navigator.appName;
var version=navigator.appVersion;
var index=version.lastIndexOf("Safari");


function showVideo1(url){
	document.getElementById('posterid').style.display='none';	
document.getElementById('trailerid').style.display='block';	
sid="shwingNowid1";
setTimeout(pass,1000)
	
//window.document[sid].SetVariable("selected", 1);	
	//setTimeout(window.document[sid].SetVariable("vid_url", url),1000);
	}
	
	
function pass(url){
	
		//alert('roger')
	window.document[sid].SetVariable("showing", 1);
	//window.document[sid].SetVariable("vid_url", url)

	
	}
	
	
function passFlash(){
	
		//alert('roger')
	//window.document['leftFalsh'].SetVariable("playflash", 1);
			document.getElementById('rightchar').style.display='block';	

	setTimeout(pass3,5000)

//	alert("centerFlash")
	
	//window.document['topfalshID'].SetVariable("playflash", 1);
	//window.document['handID'].SetVariable("playflash", 1);
	//window.document['topfalshID'].SetVariable("playflash", 1);
	
	//window.document[sid].SetVariable("vid_url", url)
//alert('roger')
	
	}
	
function pass3(){

	window.document['centerVideo'].SetVariable("playflash", 1)
		//window.document['rightchar'].SetVariable("playflash", 1);
	}	
	function passFlash1(){
	

	window.document['centerflash'].SetVariable("playflash", 1);
	//window.document['centerFlash'].SetVariable("playflash", 1);
	
//	window.document['topfalshID'].SetVariable("playflash", 1);
	//window.document['handID'].SetVariable("playflash", 1);
	//window.document['topfalshID'].SetVariable("playflash", 1);
	
	//window.document[sid].SetVariable("vid_url", url)
//alert('roger')
	//alert("centerFlash1")
	
	}

function hideFlash(){
	window.document['centerVideo'].SetVariable("playflash", 0);
	document.getElementById('rightchar').style.display='none';	
	//alert('roger');
		
		//alert(divid)
	
}
function hideCenterFlash(){
	//window.document['centerVideo'].SetVariable("playflash", 0);
	document.getElementById('hunterDiv').style.display='none';	
	//alert('roger');
		
		//alert(divid)
	
}	
function hideSideFlash(){
	//window.document['centerVideo'].SetVariable("playflash", 0);
	document.getElementById('Right_hunterDiv').style.display='block';	
	document.getElementById('left_hunterDiv').style.display='block';	
	//alert('roger');
		
		//alert(divid)
	
}	
function bodyBg(){
	//window.document['centerVideo'].SetVariable("playflash", 0);
	document.body.className ="body";

	//alert('roger');
		
		//alert(divid)
	
}	
function hideVideo(){
window.document['shwingNowid1'].SetVariable("showing", 0);
	//window.document[sid].SetVariable("vid_url", url);
document.getElementById('trailerid').style.display='none';	
document.getElementById('posterid').style.display='block';	
	
	}

function MakeGris() {
	

	if (browser=="Microsoft Internet Explorer")  {
		document.getElementById('bodyMain').style.filter='progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=30)';
		 
	}

    if (browser=="Netscape") {
	    if (index != - 1) {
			 document.getElementById('bodyMain').style.opacity =0.3;
		}
		else {
			  document.getElementById('bodyMain').style.MozOpacity=0.3	;
		}
	}
	
		 
	
}

 
function RmoveGris() {
	

	if (browser=="Microsoft Internet Explorer")  {
		 
		document.getElementById('bodyMain').style.filter='progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=100)';
	}

    if (browser=="Netscape") {
	    if (index != - 1) {
			document.getElementById('bodyMain').style.opacity =1;
			 
		}
		else {
			document.getElementById('bodyMain').style.MozOpacity=1	;
			 
		}
	}
	
		 
	
}

function hidePink1(){
	document.getElementById('Pink1').style.display='none';
}

function showPink1(){
	document.getElementById('Pink1').style.display='block';
	setTimeout(pass1,1000)

	
}
function pass1(){
	window.document["PinkFlash"].SetVariable("playflash", 1);
	//window.document["PinkFlash1"].SetVariable("playflash", 1);
	
}

function showNews(id){
MakeGris();
//document.getElementById('newsletterId').classname='Clear';
document.getElementById(id).style.display='block';
}

function hideNews(id){
//alert('roger');	
RmoveGris();
document.getElementById(id).style.display='none';
document.getElementById('newsletterDescId').style.display='none';


}







function KoeinForm1(){
		var message = "";

		
		if (document.formN.firstName.value.length == 0) {
			if (message.length == 0) message = message + "Please enter your: \n\n";
			message = message + "First Name \n";
			}

		if (document.formN.lastName.value.length == 0) {
			if (message.length == 0) message = message + "Please enter your: \n\n";
			message = message + "last Name Name \n";
			}
		
		if (document.formN.doyear.value.length == 0 || document.formN.dobday.value.length == 0  || document.formN.dofmonth.value.length == 0    ) {
			if (message.length == 0) message = message + "Please enter your: \n\n";
			message = message + "Birth Date month/day/year \n";
			}	
			

		//if (document.InfForm.lastName.value.length == 0) {
		//	if (message.length == 0) message = message + "Please enter your: \n\n";
		//	message = message + "Family Name \n";
		//	}

		//if (document.InfForm.city.value.length == 0) {
			//if (message.length == 0) message = message + "Please enter your: \n\n";
		//	message = message + "City \n";
		//	}

		if (document.formN.mobile.value.length == 0) {
			if (message.length == 0) message = message + "Please enter your: \n\n";
			message = message + "Mobile Number \n";
			}

	//	if (document.InfForm.PhoneNo.value.length == 0) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Phone number \n";
//			}
//			
//		if (document.InfForm.postalcode.value.length == 0) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Phone Zip/Postal Code \n";
//			}

		//if (document.InfForm.password.value.length == 0) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Password field cannot be left empty\n";
//			}
//		
//		if (document.InfForm.password.value!=document.InfForm.cpassword.value) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Password And Connfirm Password Does not mach! please correct\n";
//			}
//			
//		if (document.InfForm.country.value == 0) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Country (select one)\n";
//			}
//		
		email = document.formN.email.value;
		  
		if(document.formN.email.value.length !=0){
			AtPos = email.indexOf("@")
			StopPos = email.lastIndexOf(".")
			if (AtPos == -1 || StopPos == -1) {
					  if (message.length == 0) message = message + "not valid email Address\n";
			}
		}
        else {
		     message = message + "not valid email Address\n";
		}
       

		if(message.length > 0) {
			alert(message);
			return false;
			}
		else{
			return true;
			}
}























function KoeinForm(){
		var message = "";

		var i,num,boo,r;
		//num=document.InfForm.test.value;
		num1=document.InfForm.allC.value;
		var flag=true;
		var falgs = new Array();
		for (k=0;k<num1;k++){
			falgs[k]=0;
			num=document.getElementById('test'+k).value;
			//alert(num)
			for(i=0;i<num;i++){
			//alert('id'+k+'_'+i)
			
			if(document.getElementById('id'+k+'_'+i).checked==true)
				{
				//alert('id'+k+'_'+i)
					//alert(document.getElementById('id'+k+'_'+i).value)
				falgs[k]=1;
			//	alert('rogertru')
				
				}
			}
		//	alert(falgs[k])
		}
		
		for(r=0;r<num1;r++ ){
			//alert(falgs[r])
			if (falgs[r]==0){
				flag=false;
				//	alert(falgs[r])
				//
				}
			//alert(flag)
			}
			
			
			
			if (flag==false)
			{
			//alert("you must choose an answer")
				if (message.length == 0) message = message + "you must choose an answer\n\n";
			//message = message + "First Name \n";
			}

		if (document.InfForm.Name.value.length == 0) {
			if (message.length == 0) message = message + "Please enter your: \n\n";
			message = message + "First Name \n";
			}

		//if (document.InfForm.fName.value.length == 0) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Father’s Name \n";
//			}
		
		//if (document.InfForm.doyear.value.length == 0 || document.InfForm.dobday.value.length == 0  || document.InfForm.dofmonth.value.length == 0    ) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Birth Date month/day/year \n";
//			}	
			

		//if (document.InfForm.lastName.value.length == 0) {
		//	if (message.length == 0) message = message + "Please enter your: \n\n";
		//	message = message + "Family Name \n";
		//	}

		//if (document.InfForm.city.value.length == 0) {
			//if (message.length == 0) message = message + "Please enter your: \n\n";
		//	message = message + "City \n";
		//	}

		if (document.InfForm.area.value.length == 0) {
			if (message.length == 0) message = message + "Please enter your: \n\n";
			message = message + "Area of residence \n";
			}

		if (document.InfForm.phone.value.length == 0) {
			if (message.length == 0) message = message + "Please enter your: \n\n";
			message = message + "mobile number \n";
			}

	//	if (document.InfForm.PhoneNo.value.length == 0) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Phone number \n";
//			}
//			
//		if (document.InfForm.postalcode.value.length == 0) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Phone Zip/Postal Code \n";
//			}

		//if (document.InfForm.password.value.length == 0) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Password field cannot be left empty\n";
//			}
//		
//		if (document.InfForm.password.value!=document.InfForm.cpassword.value) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Password And Connfirm Password Does not mach! please correct\n";
//			}
//			
//		if (document.InfForm.country.value == 0) {
//			if (message.length == 0) message = message + "Please enter your: \n\n";
//			message = message + "Country (select one)\n";
//			}
//		
		email = document.InfForm.email.value;
		  
		if(document.InfForm.email.value.length !=0){
			AtPos = email.indexOf("@")
			StopPos = email.lastIndexOf(".")
			if (AtPos == -1 || StopPos == -1) {
					  if (message.length == 0) message = message + "not valid email Address\n";
			}
		}
        else {
		     message = message + "not valid email Address\n";
		}
       

		if(message.length > 0) {
			alert(message);
			return false;
			}
		else{
			return true;
			}
}





var xmlhttp;
function loadXMLDoc(url)
{

xmlhttp=null;
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttp!=null)
  {
	url=url+'&'+Math.random();	  
  xmlhttp.onreadystatechange=state_Change;
  xmlhttp.open("GET",url,true);
  xmlhttp.send(null);
  }
else
  {
  alert("Your browser does not support XMLHTTP.");
  }
}

function state_Change()
{
if (xmlhttp.readyState==4)
  {// 4 = "loaded"
  if (xmlhttp.status==200)
    {// 200 = "OK"
    //text=xmlhttp.responseText;
	//alert(AT.ishover+','+AT.oktomove);
	//if(AT.ishover==true && AT.oktomove==true){
	writetxt(xmlhttp.responseText);
	
	//alert("Problem retrieving data:" + xmlhttp.statusText);
	}
   // }getElementById - MDC
 else
    {
		alert(xmlhttp.responseText)
    alert("Problem retrieving data:" + xmlhttp.statusText);
	
    }
  }
}
function writetxt(str){
	//alert(str)
	document.getElementById('theaterDiv').innerHTML=str;
}




function addToBasket(thisid,theaterid,filmid,edit){
	// nbOfRecord=2;
	  id=thisid
	 // alert(edit)
	  //alert(theaterid)
	 //document.getElementById('ordernowid').innerHTML='<a href=sentorder.asp><img src=images/OrderNow.jpg width=53 height=35 border=0></a>'
	//alert('starNews='+starNews)
	//alert('endNews='+endNews)
	  writetxt('<table width=100% border=0 cellspacing=0 cellpadding=0><tr bgcolor><td  valign=top width=6><img src=images/spacer.gif height=10 width=1></td><td   valign=top align=center><img src=images/loading_ani2.gif?r=1 ></td><td width=1 valign=top >&nbsp;</td></tr></table>');
	loadXMLDoc('Theather.asp?id='+theaterid+'&filmid='+filmid+'&edit='+edit);
	
	//disableNewsNav();
	
	 
	//alert(url);
}







var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)

{

  if(popUpWin)

  {

    if(!popUpWin.closed) popUpWin.close();

  }

  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');

}
function newsletter(flag) {
	//document.body.style.filter='progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=60)';
    roger=document.getElementById('LetterMail').value;
	popUpWindow("newsletter.asp?lang=<%= lang %>&flag="+flag,600,200,390,605)
		//document.getElementById('talbeid').style.filter='progid:DXImageTransform.Microsoft.Alpha( style=0,opacity=50)';

}




function ChangeTitle(text) {
   //var newtitle = document.form1.newtitle.value;
   //var head1 = document.getElementById("head1").innerHTML=text;
  // head1.firstChild.nodeValue=text;
  // alert(text)
   document.getElementById("head1").innerHTML=text;
   document.getElementById('thecontainer').style.display='none';	

}
box=1;
function showWeekly(showimage,showtable,hideimage,hidetable,flag){
	if (flag==2){
		document.getElementById('WeeklyPic').src=showimage;
		document.getElementById('BoxPic').src=hideimage;
		document.getElementById(hidetable).style.display='none';
		document.getElementById(showtable).style.display='block';
		
	}else{
		document.getElementById('WeeklyPic').src=hideimage;
		document.getElementById('BoxPic').src=showimage;
		document.getElementById(hidetable).style.display='none';
		document.getElementById(showtable).style.display='block';
	}
	//document.getElementById(showimage).src=


}


function PassFlashTo(sid,id){
	
	
	window.document[sid].SetVariable("selected", 1);
	window.document[id].SetVariable("selected", 0);
	//window.document["sample"].SetVariable("pagename", id2);	 
	//alert("sxx");
}


function showox(showtable,hidetable,flag){
	if (flag==2){
		//document.getElementById('lebBoxImage').src=showimage;
		//document.getElementById('usBoxImage').src=hideimage;
		PassFlashTo('usBoxImage','lebBoxImage');
		document.getElementById(hidetable).style.display='none';
		document.getElementById(showtable).style.display='block';
		
	}else{
		//document.getElementById('usBoxImage').src=hideimage;
		//document.getElementById('lebBoxImage').src=showimage;
		PassFlashTo('lebBoxImage','usBoxImage');
		document.getElementById(hidetable).style.display='none';
		document.getElementById(showtable).style.display='block';
	}
	//document.getElementById(showimage).src=


}

function showGuide(showimage,showtable,hideimage,hidetable,flag){
	if (flag==2){
		document.getElementById('GuidePic').src=showimage;
		document.getElementById('DvdPic').src=hideimage;
		document.getElementById(hidetable).style.display='none';
		document.getElementById(showtable).style.display='block';
		document.getElementById(showtable).href='guides.asp';
		document.getElementById('DvdMore').style.display='none';
		document.getElementById('GuideMore').style.display='block';

		
	}else{
		document.getElementById('GuidePic').src=hideimage;
		document.getElementById('DvdPic').src=showimage;
		document.getElementById(hidetable).style.display='none';
		document.getElementById(showtable).style.display='block';
		document.getElementById('DvdMore').style.display='block';
		document.getElementById('GuideMore').style.display='none';
	}
	//document.getElementById(showimage).src=


}
function changeImage(ImageId,src) {
   //var newtitle = document.form1.newtitle.value;
   //var head1 = document.getElementById("head1").innerHTML=text;
  // head1.firstChild.nodeValue=text;
  // alert(text)
   document.getElementById(ImageId).src=src;
   //document.getElementById('thecontainer').style.display='none';	

}
