offline = false;
download = false;
if (typeof parent.server != 'undefined' && parent.server != "Online") offline = true;
if (typeof restricted == 'undefined') restricted = true;
if (typeof parent.site != 'undefined') download = true;

if (window.Event)
  document.captureEvents(Event.MOUSEUP);
function nocontextmenu() {
  event.cancelBubble = true, event.returnValue = false;

  return false;
} 
function norightclick(e) {
  if (window.Event) {
    if (e.which == 2 || e.which == 3) return false;
  }
  else if (event.button == 2 || event.button == 3) {
    event.cancelBubble = true, event.returnValue = false;
    return false;
  }
}
if (document.layers)
  document.captureEvents(Event.MOUSEDOWN);
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
document.onmouseup = norightclick;

if ((navigator.appVersion.indexOf('MSIE 3') == -1)) var fiddle = 1;
else var fiddle = -1;
var time = new Date();
var TimezoneOffset = time.getTimezoneOffset();
time.setTime(time.getTime() + TimezoneOffset*fiddle*60*1000 - 5*60*60*1000 + (true ? 60*60*1000 : 0) );
var year = time.getYear();
var date  = time.getDate();
var month = time.getMonth() + 1;
var hours = time.getHours();
var minutes = time.getMinutes();
var seconds = time.getSeconds();
var update = false;
callerdate=new Date(year,month,date,hours,minutes,seconds);

function listinginfo() {
document.write("<table border=0 width=365>");
document.write("<tr><td width=185 height=26 valign=\"bottom\"><font size=1>Name</font></td>");
document.write("<td valign=\"top\" width=35><font size=1>Date (mm/dd/yy)</font></td>");
document.write("<td valign=\"top\" width=38><font size=1>File Size (MB)</font></td>");
document.write("<td valign=\"top\" width=45><font size=1>Media Type</font></td></tr>");
document.write("<td valign=\"top\" width=35><font size=1> </font></td></tr>");
document.write("</table>");
}

function downloadvideo(section,id) {
window.open('videoengine.php?section='+section+'&'+id,'videodownload','toolbar=no,menubar=no,location=no,scrollbars=yes,status=no,resizable=no,copyhistory=no,directories=no,width=410,height=500');
}

function hostvideo(section,id) {
window.open('videoengine.php?section='+section+'&'+id+'&host=yes','videodownload','toolbar=no,menubar=no,location=no,scrollbars=yes,status=no,resizable=no,copyhistory=no,directories=no,width=410,height=500');
}

function hostgroup(grpid) {
window.open('videoengine.php?'+grpid+'&host=yes','videodownload','toolbar=no,menubar=no,location=no,scrollbars=yes,status=no,resizable=no,copyhistory=no,directories=no,width=410,height=500');
}

function openTable(section,grpid,title) {
document.write("<table border=0 width=365 cellpadding=1 cellspacing=1><tr height=16 bgcolor=#6633FF><td colspan=4 align=center><font face=Arial color=#EECCFF size=2><b>"+title+"</b></font></td></tr>"); }

function addVideo(section,id,dir,file,name,size,date,type,status) {
if (date=="0000-00-00") date="Unknown";
if (date != "Unknown") {
firstpos=date.indexOf('-')+1;
lastpos=date.lastIndexOf('-');
month=date.substring(firstpos,lastpos);
year=date.substring(2,firstpos-1);
day=date.substring(lastpos+1,date.length);
if (day=="00") day="??" 
date = month+"-"+day+"-"+year;
}
if (type==null || type=="MPEG") { type="MPEG"; backcolor="#FFCC99";}
else if (type=="SVCD") { backcolor="#FFAA00";}
else if (type=="DivX") { backcolor="#DDDE33";}
else if (type=="RealVideo") { backcolor="#FFAAFF";}
else if (type=="ASF") { backcolor="#DDCCFF";}
else if (type=="WMV") { backcolor="#CCDDFF";}
else if (type=="Quicktime") { backcolor="#CCFFAA";}
else if (type=="XVCD MPEG") { backcolor="#FFBB99";}
if (type != "MP3") {
document.write("<tr bgcolor="+backcolor+"><td width=230>");
if (!download || offline || restricted || status == '0')
document.write("<font color=#000033>"+name+"</font>");
else
document.write("<a href=\"javascript:downloadvideo('"+section+"','id="+id+"')\" onMouseOver=\"self.status='';return true\" onMouseOut=\"self.status='Christina Video Palace';return true\">"+name+"</a>");
document.write("</td><td width=51 align=center><font size=1>"+date+"</font></td><td width=38 align=center><font size=1>"+size+"</font></td><td width=46 align=center><font size=1>"+type+"</font></td></tr>"); } }

function closeTable() {
document.write("</table><br>"); }

function header() {
if (!restricted && offline)
document.write("<center><table width=750 border=0 cellpadding=0 cellspacing=0><tr><td valign=\"top\"><center><font face=arial size=3 color=#222222><b>The site is shut down at the moment</b></font></center></td></tr></table></center><br>");
if (download) {
if (restricted)
document.write("<center><table width=750 border=0 cellpadding=0 cellspacing=0><tr><td valign=\"top\"><center><font face=arial size=3 color=#222222><b>Please <a href=\"http://www.christinamultimedia.com/forum/index.php?board=;action=login\" target=\"_blank\">log in</a> to your account in order to download these videos</b></font></center></td></tr></table></center><br>");
else
document.write("<center><table width=750 border=0 cellpadding=3 cellspacing=0><tr><td valign=\"top\"><font face=arial size=2 color=#111111><font color=#222222><b>NOTE:</b></font> To download these files, you will have to left click on the link if it is available.  If there is no link, that means that there is no server currently hosting that file.  You can right click and choose 'Save Target As' or use a download program such as <a href=\"http://www.getright.com\" onMouseOver=\"self.status='GetRight';return true\" onMouseOut=\"self.status='Christina Video Palace';return true\" target=\"_blank\">GetRight</a> to download the files.  Please limit yourselves to downloading <b>ONE</b> file at a time and <b>make sure</b> that you set the retry within 60 seconds intervals.  If you get a 'Login request is denied' or 'User password is incorrect' error, that means the server is full so you'll have to wait, or try another server.  Download accelerators that attempt to connect multiple times to the server are also forbidden and will <b>NOT</b> work. You will be automatically banned if you fail to comply.  If you have followed the above and still have problems downloading, or find any other problems with the site, it would be appreciated if you could go to our <a href=\"http://www.christinamultimedia.com/forum\" onMouseOver=\"self.status='ChristinaMultimedia Forum';return true\" onMouseOut=\"self.status='Christina Video Palace';return true\" target=\"_blank\">forum</a> to notify us in the Bugs Report page.  If you need assistance, you can submit a trouble ticket in our Contact Center <a href=\"http://www.christinamultimedia.com/contact.php?action=submitticket\" onMouseOver=\"self.status='ChristinaMultimedia Contact Center';return true\" onMouseOut=\"self.status='Christina Video Palace';return true\" target=\"_blank\">HERE</a>.</font></td></tr></table></center><br><br>");
}
else
document.write("<center><table width=750 border=0 cellpadding=0 cellspacing=0><tr><td valign=\"top\"><center><font face=arial size=2 color=#222222><b>Please enter from the main page of <a href=\"http://www.christinamultimedia.com\" onMouseOver=\"self.status='Christina Video Palace';return true\" onMouseOut=\"self.status='Christina Video Palace';return true\"><font face=arial size=3 color=#BBEEFF>Christina Video Palace</font></a> to download</b></font></center></td></tr></table></center><br>");
}

function footer() {
document.write("<br><br><center><table width=550 border=1 cellpadding=3 cellspacing=0><tr><td valign=\"top\"><center><b><font face=arial size=1 color=#CCFFCC>Copyright © 2002 Christina Video Palace, affiliate of <a href=\"http://www.christinamultimedia.com\" onMouseOver=\"self.status='http://www.christinamultimedia.com';return true\" onMouseOut=\"self.status='Christina Video Palace';return true\" target=\"_blank\"><b><font color=#CCFF00>ChristinaMultimedia</font></b></a>. All Rights Reserved.<br>All videos on this site are copyrighted by their respective owners.<br>Support for Christina is strongly encouraged.<br>Please read the FAQ if you have any questions before contacting us.</font></b></center></td></tr></table></center>"); }
