﻿function account(){
var cart=((document.cookie+';').match(/maniax=([^;]+);/))?RegExp.$1:':';
var uid=((document.cookie+';').match(/uid=([^;]+);/))?RegExp.$1:'';
location.href='https://www.maniaxdvd.com/english/account/?cart='+cart+'&login='+uid; }

function opencart(){
cartWin = window.open('cart.php','cart','toolbar=no,location=no,status=no,menubar=no,scrollbars =yes,width=420,height=450');
cartWin.focus(); }

function set_cart(itm){
var cart=((document.cookie+';').match(/maniax=([^;]+);/))?RegExp.$1:':';
var data=cart.split(':'); var ck="maniax="+data[0]+itm+'.:'+data[1];
var exp=new Date();exp.setTime(exp.getTime()+(48000*60*60));
document.cookie=ck+';expires='+exp.toGMTString()+';path=/english';
alert('Added to the cart'); }

function set_combo(itm){
var cart=((document.cookie+';').match(/maniax=([^;]+);/))?RegExp.$1:':';
var data=cart.split(':'); ck='maniax='+data[0]+':'+data[1]+itm+'.';
var exp=new Date();exp.setTime(exp.getTime()+(48000*60*60));
document.cookie=ck+';expires='+exp.toGMTString()+';path=/english';
alert('Added to the combo'); }

function find(){
var knd=document.findform.schoice.value;
var wrd= document.findform.sword.value;
if(knd=='actress'){wrd+='*';}
var urlwrd=encodeURIComponent(wrd);
if(wrd.length < 2){alert('Keyword is too short');}
else{location.href='list.php?ktype1='+knd+'&key1='+urlwrd;} }

function moviedl(){
alert('Right click to download');
return false; }

function crrate(tid,file,res){
if(res){document.getElementById(dId).innerHTML = res;}
else if(file){window.dId = tid; loadfile(file,arguments.callee);}
else{} }

function loadfile(file,fnc){
try{httpObj = new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){httpObj = new XMLHttpRequest();}
if(httpObj){
httpObj.onreadystatechange = function(){
if(httpObj.readyState == 4 && httpObj.status == 200){fnc('','',httpObj.responseText);} }
httpObj.open("get", file, true); httpObj.send(null);} }

