click1on = new Image();
click1on.src = "images/click1on.gif";
click1off = new Image();
click1off.src = "images/click1.gif";

click2on = new Image();
click2on.src = "images/click2on.gif";
click2off = new Image();
click2off.src = "images/click2.gif";

click3on = new Image();
click3on.src = "images/click3on.gif";
click3off = new Image();
click3off.src = "images/click3.gif";

signup = new Image(109, 21);
signup.src = "images/signon.gif";

function next(i){document[i].src = "images/next.gif"}
function nexton(i){document[i].src = "images/nexton.gif"}

function back(i){document[i].src = "images/back.gif"}
function backon(i){document[i].src = "images/backon.gif"}

function ion(x){document[x].src = "images/num/"+x+"on.gif"}
function ioff(x){document[x].src = "images/num/"+x+".gif"}

function on(imgName){
 imgOn = eval(imgName + "on.src");
 document[imgName].src = imgOn
}
function off(imgName){
 imgOff = eval(imgName + "off.src");
 document[imgName].src = imgOff
}

function bookmark(){
 netscape="First push OK and then hit CTRL+D to add a bookmark to this site."

 if (navigator.appName=='Microsoft Internet Explorer'){
  window.external.AddFavorite("http://moviewer.com/", "Moviewer.com - Extreme Quality DVD Movies");
 }
 else if(navigator.appName=='Netscape'){
  alert(netscape);
 }
}

// --============= Start Active Content Script =============-- //

// v1.0
// Copyright 2006 Adobe Systems, Inc. All rights reserved.
// Source: http://www.adobe.com/devnet/activecontent/articles/devletter.html

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

// --=============  End Active Content Script  =============-- //

// --================ Start Help Tip Script ================-- //

function showHelpTip(e, sHtml, bHideSelects) {

 // find anchor element
 var el = e.target || e.srcElement;
 while (el.tagName != "A")
  el = el.parentNode;
 
 // is there already a tooltip? If so, remove it
 if (el._helpTip) {
  helpTipHandler.hideHelpTip(el);
 }

 helpTipHandler.hideSelects = Boolean(bHideSelects);

 // create element and insert last into the body
 helpTipHandler.createHelpTip(el, sHtml);
 
 // position tooltip
 helpTipHandler.positionToolTip(e);

 // add a listener to the blur event.
 // When blurred remove tooltip and restore anc
 el.onblur = helpTipHandler.anchorBlur;
 el.onkeydown = helpTipHandler.anchorKeyDown;
}

var helpTipHandler = {
 hideSelects: false,
 
 helpTip:  null,
 
 showSelects: function (bVisible) {
  if (!this.hideSelects) return;
  // only IE actually do something in here
  var selects = [];
  if (document.all)
   selects = document.all.tags("SELECT");
  var l = selects.length;
  for (var i = 0; i < l; i++)
   selects[i].runtimeStyle.visibility = bVisible ? "" : "hidden"; 
 },
 
 create: function () {
  var d = document.createElement("DIV");
  d.className = "help-tooltip";
  d.onmousedown = this.helpTipMouseDown;
  d.onmouseup = this.helpTipMouseUp;
  document.body.appendChild(d);  
  this.helpTip = d;
 },
 
 createHelpTip: function (el, sHtml) {
  if (this.helpTip == null) {
   this.create();
  }

  var d = this.helpTip;
  d.innerHTML = sHtml;
  d._boundAnchor = el;
  el._helpTip = d;
  return d;
 },
 
 // Allow clicks on A elements inside tooltip
 helpTipMouseDown: function (e) {
  var d = this;
  var el = d._boundAnchor;
  if (!e) e = event;
  var t = e.target || e.srcElement;
  while (t.tagName != "A" && t != d)
   t = t.parentNode;
  if (t == d) return;
  
  el._onblur = el.onblur;
  el.onblur = null;
 },
 
 helpTipMouseUp: function () {
  var d = this;
  var el = d._boundAnchor;
  el.onblur = el._onblur;
  el._onblur = null;
  el.focus();
 }, 
 
 anchorBlur: function (e) {
  var el = this;
  helpTipHandler.hideHelpTip(el);
 },
 
 anchorKeyDown: function (e) {
  if (!e) e = window.event
  if (e.keyCode == 27) { // ESC
   helpTipHandler.hideHelpTip(this);
  }
 },
 
 removeHelpTip: function (d) {
  d._boundAnchor = null;
  d.style.filter = "none";
  d.innerHTML = "";
  d.onmousedown = null;
  d.onmouseup = null;
  d.parentNode.removeChild(d);
  //d.style.display = "none";
 },
 
 hideHelpTip: function (el) {
  var d = el._helpTip;
  /* Mozilla (1.2+) starts a selection session when moved
   and this destroys the mouse events until reloaded
  d.style.top = -el.offsetHeight - 100 + "px";
  */  
  
  d.style.visibility = "hidden";
  //d._boundAnchor = null;

  el.onblur = null;
  el._onblur = null;
  el._helpTip = null;
  el.onkeydown = null;
  
  this.showSelects(true);
 },
 
 positionToolTip: function (e) {
  this.showSelects(false);  
  var scroll = this.getScroll();
  var d = this.helpTip;
  
  // width
  if (d.offsetWidth >= scroll.width)
   d.style.width = scroll.width - 10 + "px";
  else
   d.style.width = "";
  
  // left
  if (e.clientX > scroll.width - d.offsetWidth)
   d.style.left = scroll.width - d.offsetWidth + scroll.left + "px";
  else
   d.style.left = e.clientX - 2 + scroll.left + "px";
  
  // top
  if (e.clientY + d.offsetHeight + 18 < scroll.height)
   d.style.top = e.clientY + 18 + scroll.top + "px";
  else if (e.clientY - d.offsetHeight > 0)
   d.style.top = e.clientY + scroll.top - d.offsetHeight + "px";
  else
   d.style.top = scroll.top + 5 + "px";
   
  d.style.visibility = "visible";
 },
 
 // returns the scroll left and top for the browser viewport.
 getScroll: function () {
  if (document.all && typeof document.body.scrollTop != "undefined") { // IE model
   var ieBox = document.compatMode != "CSS1Compat";
   var cont = ieBox ? document.body : document.documentElement;
   return {
    left: cont.scrollLeft,
    top: cont.scrollTop,
    width: cont.clientWidth,
    height: cont.clientHeight
   };
  }
  else {
   return {
    left: window.pageXOffset,
    top: window.pageYOffset,
    width: window.innerWidth,
    height: window.innerHeight
   };
  }
 }
};

// --================  End Help Tip Script  ================-- //

var login = "<font class='text'>It is better you click the <font color='#009900'><b>Right Button</b></font> "+
            "instead, select '<font color='#009900'><b>Save Target As...</b></font>' and<br> save this free "+
            "preview movie onto your desktop. Then open it of course :)<br>"+
            "This is only a short preview of each movie format we offer to our Members<br><br>"+
            "For MPEG-2 you need to have a DVD Player such as CyberLink PowerDVD<br>"+
            "or InterVideo WinDVD. Otherwise click here for a free <a href='Player.exe'>Powerful Player</a>."+
            "<br><br>For more information about Media Player Classic, <a href='http://en.wikipedia.org/wiki/"+
            "Media_Player_Classic' target='_blank'>read on Wikipedia</a>.<br><br>For AppleMac playing MPEG-2"+
            ", I would suggest <a href='http://www.videolan.org/vlc/download-macosx.html' target='_blank'>VL"+
            "C Media Player</a>.</font>"

var dload = "<font class='text'>It is better you click the <font color='#009900'><b>Right Button</b></font> "+
            "instead, select '<font color='#009900'><b>Save Target As...</b></font>' and<br> save this DVD M"+
            "ovie file onto your desktop. Then Play it of course :)<br><br>"+
            "For MPEG-2 you need to have a DVD Player such as CyberLink PowerDVD<br>"+
            "or InterVideo WinDVD. Otherwise click here for a free <a href='Player.exe'>Powerful Player</a>."+
            "<br>For more information about Media Player Classic, <a href='http://en.wikipedia.org/wiki/"+
            "Media_Player_Classic' target='_blank'>read on Wikipedia</a>.<br><br>For Apple Mac playing MPEG-"+
            "2, I would suggest <a href='http://www.videolan.org/vlc/download-macosx.html' target='_blank'>V"+
            "LC Media Player</a>.<br><br>You can also burn it on any blank DVD and watch it directly on your"+
            " TV!</font>"