
function loadlist(status){
document.getElementById('movieid').value='';
window.scrollTo(0,90);
// ajaxpage('/omniv/inc/mods/search.php?action=actorstats&actor='+q+'&movie_id='+movie_id+'','loader');
document.getElementById("cencol").innerHTML='<img src="/images/processing.gif" />';
setTimeout("ajaxpage('/omniv/inc/mods/search.php?action=loadlist&status="+status+"','cencol')",1000);
	
	
} 

function searchperson(){

var q=document.getElementById("searchq").value;
var movie_id=document.getElementById("movie_id").value;

if(q==""){
alert('TRY SEARCHING FOR SOMETHING');
return false;
}else{
window.scrollTo(0,90);
 ajaxpage('/omniv/inc/mods/search.php?action=actorstats&actor='+q+'&movie_id='+movie_id+'','loader');
document.getElementById("cencol").innerHTML='<img src="/images/processing.gif" />';
setTimeout("ajaxpage('/omniv/inc/mods/search.php?q="+q+"','cencol')",1000);

}

}

function loadsearch(start){

document.getElementById("cencol").innerHTML='<img src="/images/processing.gif" />';
setTimeout("ajaxpage('/omniv/inc/mods/search.php?action=loadsearch&start="+start+"','cencol')",1000);
}
function searchit(){
	window.scrollTo(0,90);
document.getElementById('movieid').value='';
var q=document.getElementById("searchq").value;

if(q==""){
alert('TRY SEARCHING FOR SOMETHING');
return false;
}else{
	
document.getElementById("cencol").innerHTML='<img src="/images/processing.gif" />';
setTimeout("ajaxpage('/omniv/inc/mods/search.php?q="+q+"','cencol')",1000);

}

}

function persons20(){

ajaxpage('/inc/mods/top20actors.php','persons20');
setTimeout('persons20()', 30000); 

}

function loadmedia(placid){
	
var mediadesc=document.getElementById('mediadesc_'+placid+'').value;
var vsize=document.getElementById('vsize_'+placid+'').value;
var movieid=document.getElementById('movieid_'+placid+'').value;
var video=document.getElementById('video_'+placid+'').value;

var config='&desc='+mediadesc+'&vsize='+vsize+'&movieid='+movieid+'&video='+video+'';
ajaxpage('/omniv/inc/ftpmac4/applet.php?action=loadfinal'+config+'','media_'+movieid+'_'+placid+'')
	
}

// REMOVE FILE

function addnewadv(movieid){
	
var x=confirm("Adding Advanced Online Ticketing?");
 
if(x){

  var v=confirm("Adding Advanced Online Ticketing");
  
  	if(v){
 ajaxpage('/inc/movie_ai/movie_advstks.php?action=addnew&movieid='+movieid+'','adv_'+movieid+'');
 
 
 
//jumper("/members/inc/mods/mylinks.php?action=countlinks&ajax=1","total_links","1000");
//jumper("/members/inc/mods/mylinks.php?action=loadlinks&ajax=1","my_links","1300"); 

 
	}else{
alert("No Action Taken");			
	}

}else{
	
alert("No Action Taken");	;	
}	
	
}

function openurls(url){
	
var googlewin=dhtmlwindow.open("googlebox", "iframe", url, "OmniVMovies", "width=850px,height=550px,resize=1,scrolling=1,center=1", "recal")

 
	
} 
function openmovieai(url,movied,section){

//var agreewin=dhtmlmodal.open("agreebox", "iframe", ""+url+"", "This Page's Terms of service", "width=590px,height=450px,center=1,resize=1,scrolling=0", "recal")
	emailwindow=dhtmlmodal.open('EmailBox', 'iframe', ''+url+'', 'OmniVMovie', 'width=650px,height=360px,center=1,resize=0,scrolling=1')

emailwindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
   theemail.value="yes";
if (theemail.value.indexOf("yes")==-1){ //crude check for invalid email
		alert("Please type yes in all lower case.")
		return false //cancel closing of modal window
	}

else{ //else if this is a valid email
     document.getElementById(section).style.display='block';
	 
	 document.getElementById(section).innerHTML='UPDATE MADE!' //Assign the email to a span on the page
		
	 //ajaxpage('/omniv/inc/mods/movieinfo.php?movieid='+movieid+'','cencol');	
		return true //allow closing of window
	}
}
	
}

function deladvmovie(movieid,sale_id){
	
var x=confirm("Deleting Advanced Tickets are you sure?");
 
if(x){
 ajaxpage('/inc/movie_ai/movie_ai.php?action=moviegone&movieid='+movieid+'','moviegoneadv_'+movieid+'_'+sale_id+''); 
  var v=confirm("This Advanced Tickets is about to be deleted! Are you sure?");

  	if(v){
//document.getElementById('movieid').value='';	

 ajaxpage('/inc/movie_ai/movie_advstks.php?action=del&movieid='+movieid+'&sale_id='+sale_id+'','adv_'+movieid+'');

 
 
//jumper("/members/inc/mods/mylinks.php?action=countlinks&ajax=1","total_links","1000");
//jumper("/members/inc/mods/mylinks.php?action=loadlinks&ajax=1","my_links","1300"); 

 
	}else{
alert("Action Cancelled");			
	}

}else{
	
alert("Action Cancelled");	
}	
	
}

function delmovie(movieid){
	
var x=confirm("Deleting Movie are you sure?");
 
if(x){
ajaxpage('/inc/movie_ai/movie_ai.php?action=moviegone&movieid='+movieid+'','moviegone_'+movieid+''); 
  var v=confirm("This movie is about to be deleted! Are you sure?");

  	if(v){
document.getElementById('movieid').value='';		
 ajaxpage('/inc/movie_ai/movie_ai.php?action=delmovie&movieid='+movieid+'','cencol');

 
 
//jumper("/members/inc/mods/mylinks.php?action=countlinks&ajax=1","total_links","1000");
//jumper("/members/inc/mods/mylinks.php?action=loadlinks&ajax=1","my_links","1300"); 

 
	}else{
alert("Action Cancelled");			
	}

}else{
	
alert("Action Cancelled");	
}	
	
}

function addnewmovie(){
	
var x=confirm("Adding Movie are you sure?");
 
if(x){

  var v=confirm("Adding a movie requires uploading poster, length,mpaa,cast and small descriptions.");
  
  
  	if(v){
document.getElementById('movieid').value=''; 
 
ajaxpage('/inc/movie_ai/movie_general.php?action=addnewmoview','cencol');
 
 
 
//jumper("/members/inc/mods/mylinks.php?action=countlinks&ajax=1","total_links","1000");
//jumper("/members/inc/mods/mylinks.php?action=loadlinks&ajax=1","my_links","1300"); 

 
	}else{
alert("Movie Not Added");			
	}

}else{
	
alert("Movie Not Added");	;	
}	
	
}
function del_link(link_id){
	
 
var x=confirm("ARE YOU SURE YOU WANT TO REMOVE THIS LINK! ARE YOU SURE?");
 
if(x){

  var v=confirm("LINK ABOUT TO BE REMOVED!!!");
  
  	if(v){

 
ajaxpage('/members/inc/mods/mylinks.php?action=dellinks&link_id='+link_id+'&ajax=1','link_'+link_id+'');
jumper("/members/inc/mods/mylinks.php?action=countlinks&ajax=1","total_links","1000");
jumper("/members/inc/mods/mylinks.php?action=loadlinks&ajax=1","my_links","1300"); 

	}else{
alert("LINK WILL NOT BE REMOVED!!");			
	}

}else{
	
alert("LINK WILL NOT BE REMOVED!!");	
}

 

					 
}

function addmylink(){

var link_desc=document.getElementById('link_desc').value;
var link_url=document.getElementById('link_url').value;

	if(link_desc==""){
	alert("Please Enter Link Description");
	document.getElementById('link_desc').focus();
	return false;
	}
	if(link_url==""){
	alert("Please Enter Link URL. Please remeber to include the http:// or https://");
	document.getElementById('link_url').focus();
	return false;
	}	

ajaxpage("/members/inc/mods/mylinks.php?action=addmylinks&link_desc="+link_desc+"&link_url="+link_url+"&ajax=1","link_ai");

jumper("/members/inc/mods/mylinks.php?action=countlinks&ajax=1","total_links","1000");
jumper("/members/inc/mods/mylinks.php?action=loadlinks&ajax=1","my_links","1300"); 

}

var win = null;
function NewPoPWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+','
win = window.open(mypage,myname,settings)
}



// REMOVE FILE
function delfile2(url,isdir){
	
	if(isdir=="1"){
var x=confirm("ARE YOU SURE YOU WANT TO REMOVE THIS DIRECTORY! THIS WILL REMOVE ALL FILES AND SUB-DIRECTORIES!!!");		
	}else{
var x=confirm("ARE YOU SURE YOU WANT TO REMOVE THIS FILE! ARE YOU SURE?");
	}
if(x){

  var v=confirm("ITEM(s) ABOUT TO BE REMOVED!!!");
  
  	if(v){

//ajaxpage('/admin/inc/mods/user_files.php?action=delfile&user_id='+ID+'&filename='+file+'&fileid='+fileid+'','user_files_'+ID+'');
//ajaxpage('/admin/inc/mods/user_files.php?user_id='+ID+'','user_files_'+ID+'');
//ajaxpage('/admin/inc/mods/users.php?action=udel&user='+ID+'','admin_content');
//ajaxpage('/admin/inc/mods/users.php','admin_content');

NewPoPWindow(url,'DelMyUploads','10','10','no');

	
	}else{
alert("ITEM WILL NOT BE REMOVED!!");			
	}

}else{
	
alert("ITEM WILL NOT BE REMOVED!!");	
}

 

					 
}











function cancelapp(app_id,contact_id,hour,month,day,year,step){

 	jumper("/inc/mods/calendar.php?action=dellapp&app_id="+app_id+"&contact_id="+contact_id+"","hour_div_"+hour+"","500");	
	//jumper("/inc/mods/calendar.php?month="+month+"&day="+day+"&year="+year+"&action=loadhour&hour="+hour+"&view=5","hour_div_"+hour+"","1500");
	jumper("/inc/mods/calendar.php?month="+month+"&day="+day+"&year="+year+"","content","1500");
 
	
}

function newwin(url,name,h,w) {
	var layout="resizable=yes,scrollbars=yes";
	newwindow=window.open(url,"NewWindow",'height='+h+',width='+w+','+layout+'');

}


function addappcon(app_id,contact_id,hour,step,view,month,day,year){
	
	jumper("/inc/mods/calendar.php?action=addappcontact&app_id="+app_id+"&contact_id="+contact_id+"","hour_div_"+hour+"","500");	
	jumper("/inc/mods/calendar.php?month="+month+"&day="+day+"&year="+year+"&action=addhour&hour="+hour+"&view="+view+"&app_id="+app_id+"&step="+step+"","hour_div_"+hour+"","1500");
//	javascript:ajaxpage('/inc/mods/calendar.php?month=2&day=12&year=2009&action=addhour&hour=0&view=5&app_id=35&step=1&1234297355468&step=2&1234297357145&step=2&1234297382353&step=2&1234297396868&step=2&1234297402538&step=2&1234297403372&step=2&1234297404444&step=2&1234297412261&step=2&1234297459558&step=2&1234297472680&step=2&1234297514096&step=2&1234297541117&step=2&1234297574529&step=2&1234297593183&step=2&1234297785259&step=1&1234297789342&step=2&1234297791256&1234297933207&1234297933916&step=2','hour_div_0');
}

function contactsearch(){

var s=document.getElementById('search').value
jumper("/inc/mods/contacts.php?s="+s+"","content","500");		
	
}

function addcontact(){
	
jumper("/inc/mods/contacts.php?action=addcontact","content","500");	
jumper('/inc/mods/contacts.php','content','1500')

}

function jumper(url,div,secs){
	
ajaxpage("/index.php?action=loading",""+div+"");
setTimeout('ajaxpage("'+url+'","'+div+'")',secs);
	
}
 
// REMOVE FILE
function delfile(ID,file,fileid){
					 
var x=confirm("ARE YOU SURE YOU WANT TO REMOVE THIS FILE! ARE YOU SURE?");

if(x){

  var v=confirm("FILE ABOUT TO BE REMOVED!!!");
  
  	if(v){

ajaxpage('/admin/inc/mods/user_files.php?action=delfile&user_id='+ID+'&filename='+file+'&fileid='+fileid+'','user_files_'+ID+'');
ajaxpage('/admin/inc/mods/user_files.php?user_id='+ID+'','user_files_'+ID+'');
//ajaxpage('/admin/inc/mods/users.php?action=udel&user='+ID+'','admin_content');
//ajaxpage('/admin/inc/mods/users.php','admin_content');
		
	}else{
alert("FILE WILL NOT BE REMOVED!!");			
	}

}else{
	
alert("FILE WILL NOT BE REMOVED!!");	
}

 

					 
}
// REMOVE USER 
function deluser(ID){
					 
var x=confirm("ARE YOU SURE YOU WANT TO REMOVE THIS USER! ARE YOU SURE?");

if(x){

  var v=confirm("USER ABOUT TO BE REMOVED!!! ALONG WITH HIS FILES?!!");
  
  	if(v){

ajaxpage('/admin/inc/mods/users.php?action=udel&user='+ID+'','admin_content');
ajaxpage('/admin/inc/mods/users.php','admin_content');
		
	}else{
alert("USER WILL NOT BE REMOVED!!");			
	}

}else{
	
alert("USER WILL NOT BE REMOVED!!");	
}

 

					 
}

// VALIDATE SPC
function checkvalid(){
	
	
 	var spc=document.getElementById('spc').value = document.getElementById('spc').value.toUpperCase();
 
	if(document.getElementById('spc').value=="YES"){
    document.getElementById('spca').innerHTML='<img src="/images/loading.gif">';
	document.getElementById('spcc').innerHTML= spc+' I AGREE TO ALL TERMS AND ITEMS LISTED ABOVE';
	setTimeout('ajaxpage("/admin/spc-company.php?action=activate","spcb")',3000);
	
	setTimeout("window.location = '/'",5000);
	}
}
// SPC INTRANET

function addcatigory(){
	
	var pid=document.getElementById('parentcatid').value;
	var catdesc=document.getElementById('catdesc').value;
	var status=document.getElementById('status').value;
	var what=document.getElementById('what').value;
	var margin=document.getElementById('margin').value;
 

//alert(pid);
////alert(catdesc);
//alert(status);

if(!catdesc){
		
	alert('NO CAT');	
		
	return false;
	}else{
		
 if(pid=="0"){
ajaxpage('/admin/inc/actions.php?formaction=add&what='+what+'&parentcatid='+pid+'&catdesc='+catdesc+'&status='+status+'','cat_add_'+pid+'');	  	 
ajaxpage("/inc/lang/eng/html/cats/catlist.php","cat_content");	 
	 
 }else{
ajaxpage('/admin/inc/actions.php?formaction=add&what='+what+'&parentcatid='+pid+'&catdesc='+catdesc+'&status='+status+'','cat_dep_add_'+pid+'');	  
//ajaxpage('/inc/lang/eng/html/cats/catlist.php?action=loadone&catid='+pid+'','cat_'+pid+'');	 
//ajaxpage('/inc/lang/eng/html/cats/catlist.php?action=getdepcat&catid='+pid+'','depcat_'+pid+'');	  	  
ajaxpage("/vc.php?newcat=1&dcatid="+pid+"&margin="+margin+"","dep_cat_id_"+pid+"");	 
 }
}
	
	
	
}

function delcat(catid,parentcatid){
	
var i=confirm('SET TO IN-ACTIVE');

if(i){
	
	var w=confirm('THIS WILL CAUSE USERS NOT TO BE ABLE TO SEARCH FOR FILES IN THIS SECTION');

if(w){

 ajaxpage('/admin/inc/actions.php?formaction=delete&what=categories&catid='+catid+'','cat_'+catid+'_div');
 ajaxpage('/inc/lang/eng/html/cats/catlist.php?action=loadone&catid='+parentcatid+'','cat_'+parentcatid+'');	
 	alert('ACTION TAKEN');
}else{
  alert('NOTHING DONE!');s	
}
}else{
   alert('NOTHING DONE!');
	 
}



}
function loadcat(catid){



	
	
	
}

function hidediv(catid){
	
ajaxpage("/inc/lang/eng/html/cats/catlist.php?action=clear&catid="+catid+"","cat_"+catid+"_icon"); 
document.getElementById("cat_"+catid+"_icon_hide").style.display='block';	

document.getElementById("cat_"+catid+"_files").innerHTML='';	
document.getElementById("cat_"+catid+"_files").style.display='none';	

} 

/***********************************************
* Cool DHTML tooltip script II- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var offsetfromcursorX=12 //Customize x offset of tooltip
var offsetfromcursorY=10 //Customize y offset of tooltip

var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to pointer image
var offsetdivfrompointerY=14 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

document.write('<div id="dhtmltooltip"></div>') //write out tooltip DIV
document.write('<img id="dhtmlpointer" src="/images/arrow2.gif">') //write out pointer image

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth){
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight){
tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

document.onmousemove=positiontip

function whosonline(){

ajaxpage('/inc/whoisonline.php','whosonline');
	setTimeout("whosonline()",5000);	
}

function movielist(){

ajaxpage('/omniv/inc/mods/movielist.php','movielist');
 
 
Effect.SwitchOff('usernotice');  
//document.getElementById('usernotice').style.display='none'; 
ajaxpage('/omniv/inc/mods/movielist.php?action=hide','usernotice');

var adv_ai=document.getElementById('adv_ai');

 

	if(adv_ai){
//document.getElementById('adv_ai').style.display='none'; 
Effect.SwitchOff('adv_ai');  
//ajaxpage('/omniv/inc/mods/movielist.php?action=hide','adv_ai');
	}


setTimeout("movielist()",10000);	
	
}

function movielistnew(){

ajaxpage('/omniv/inc/mods/movielist.php?type=new','movielistnew');
setTimeout("movielistnew()",10000);	
	
}


function activemovie(){
var movieid=document.getElementById('movieid').value;

		if(movieid!=""){
		ajaxpage('/omniv/inc/mods/movieinfo.php?movieid='+movieid+'','cencol');
		
		}
	setTimeout("activemovie()",15000);			
}

function showadvs(){
var showadvs=document.getElementById('showadvs');

		if(showadvs){
		ajaxpage('/omniv/advstks.php','cencol');

		}
	setTimeout("showadvs()",10000);			
}

function pendingvideo(){
var showadvs=document.getElementById('pendingvideo');

		if(showadvs){
		ajaxpage('/omniv/pendingvideo.php','pendingvideo');

		}
	setTimeout("pendingvideo()",10000);			
}


function loadoverview(movieid){
var showadvs=document.getElementById('overview_'+movieid+'');

		if(showadvs){
		ajaxpage('/omniv/inc/mods/search.php?action=loadoverview&movieid='+movieid+'','overview_'+movieid+'');

		}
	setTimeout("loadoverview("+movieid+")",16000);			
}


function loadcast(movieid){
var showadvs=document.getElementById('cast_'+movieid+'');

		if(showadvs){
		ajaxpage('/omniv/inc/mods/search.php?action=loadcast&movieid='+movieid+'','cast_'+movieid+'');

		}
	setTimeout("loadcast("+movieid+")",16000);			
}



function onlineusers(){
var showadvs=document.getElementById('online');

		if(showadvs){
		ajaxpage('/v2/index.php?action=loadusers','online');

		}
	setTimeout("onlineusers()",10000);			
}