if (document.location.toString().indexOf('norder.html')!=-1) {document.location='http://order.store.yahoo.com/cgi-bin/wg-order?edaymovie'}

var moretxtvalue='';
var nRec = 0;
var related = new Array();
var CurrItemId='addcook';
var ie = false;
var ns6 = false;
var ns = false;
var opera = false;
if (eval(document.layers)) { ns=true; }
else {
	if (eval(document.all)) { ie=true; if (navigator.userAgent.indexOf('Opera')!=-1) opera=true;}
		else {
			if (eval(document.getElementById)) { ns6=true;}
			}
	}
// Hide and Show menu

//finds and return <DIV> object by given name



function Layer(layerName) {
return (ns)?(document.layers[layerName]):((ns6)?(document.getElementById(layerName)):(document.all(layerName)));
}
function enlarge(url,imgw,imgh) {
var leftPos = (screen.availWidth-900) / 2;
var topPos = (screen.availHeight-600) / 2;
imgw=eval(imgw)+20;
imgh=eval(imgh)+30;

if(imgh > screen.availHeight - 30)
{
	imgh = screen.availHeight - 30;
}

if(imgw > screen.availWidth - 30)
{
	imgw = screen.availWidth - 30;
}

window.open(url, 'EnlargePicture','width='+imgw+',height='+imgh+',scrollbars=no,resizable=no,statusbar=no,location=no,titlebar=0,top=' + topPos + ',left=' + leftPos);
}

function insertMore() {
if (moretxtvalue!='') {
	var leftPos = (screen.availWidth-900) / 2;
	var topPos = (screen.availHeight-600) / 2;
	var MoreInfo = new Object();
	MoreInfo = window.open('', 'EnlargePicture','width=600,height=500,scrollbars=yes,resizable=no,statusbar=no,location=no,titlebar=0,top=' + topPos + ',left=' + leftPos);
	MoreInfo.document.write('<html><head><title>EdayMovies.com</title><link rel="stylesheet" type="text/css" href="http://edaymovie.com/main.css"></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%" align="center"><tr><td height="2"></td></tr><tr><td bgcolor="#002853" height="48" valign="top"><table border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><table border="0" cellpadding="0" cellspacing="0"><tr><td height="12" colspan="2"></td></tr><tr><td width="14" nowrap=""></td><td valign="top"><a href="#" onclick="window.close();return false;"><img src="http://edaymovie.com/images/logo.gif" width="189" height="27" alt="" border="0"></a></td></tr></table></td><td width="5" nowrap=""></td><td valign="bottom" height="48"><!-- menu --><table border="0" cellpadding="0" cellspacing="0"><tr><!-- menu-item-active --><td width="4" nowrap></td><td bgcolor="#ffffff"></td><!-- menun-item --></tr></table><!-- menu --></td></tr></table></td></tr></table><table border="0" cellpadding="5" cellspacing="0"><tr><td>' + moretxtvalue + '</td></tr></table></body></html>');
	}
else {
	alert('Your browser settings not allow to run scripts or version of your browser is old.');
	}
}

var Currtop='<tr><td bgcolor="#ffffff" colspan="3"><table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#F6F9FA"><tr><td height="5" bgcolor="#ffffff" colspan="2"><img src="http://edaymovie.com/images/pix.gif" border="0" width="1" height="1"/></td></tr><tr><td height="5"></td></tr><tr><td width="2" nowrap=""></td><td bgcolor="#ffffff" height="20"><p class="heading3 black medium"><img src="http://edaymovie.com/images/b-pix.gif" border="0" width="3" height="3" hspace="7" align="absmiddle"/>Recently Viewed Items</p></td></tr><tr><td height="5"></td></tr></table><table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#F6F9FA"><tr><td height="98" valign="top"><table border="0" cellpadding="0" cellspacing="0"><tr>';

var Currbot='</tr></table></td></tr></table></td></tr>';

var Currdiv='';

var CurrItema='<td><table border="0" cellpadding="0" cellspacing="0" width="103"><tr><td align="center" valign="top" height="98">';

var CurrItemb='</td><td width="5" nowrap=""></td><td width="1" nowrap background="http://edaymovie.com/images/dots-lb-v.gif" valign="bottom"><img src="http://edaymovie.com/images/lb-pix.gif" border="0" width="1" height="14"/></td><td width="5" nowrap=""></td></tr></table></td>';

var botDiv = '';

var relRow = '';
	
var test = '';	
	function pasteRelated() {
	var asd=0;
	var Rell=false;
	for (var i=1;i<7;i++) {
		ccc='rel_'+i;
		if (GetCookie(ccc)) {
			Rell=true;
			asd=asd+1;
			}
		}
//	alert(GetCookie('rel_5'));
	if (Rell) {
		document.write(Currtop);
	for (var i=1;i<7;i++)
	{
		ccc='rel_'+i;
		if (GetCookie(ccc)) {
			tempvall=GetCookie(ccc);
			document.write(CurrItema);
			document.write(tempvall);
			document.write(CurrItemb);
			}
		}

		document.write(Currbot);
		}
	}
	
function TellToFriend() {
var NewPop = new Object();
NewPop=window.open("http://www.edaymovie.com/custom/ytellafriend.php?link="+pid.toLowerCase(),"tellafriend","HEIGHT=280,WIDTH=520,scrollbars=yes,resizable=yes,top=50,left=50");
NewPop.window.focus();
}
function maillist(emailval) {
var NewPop = new Object();
NewPop=window.open('http://www.edaymovie.com/custom/addemail.php?mail='+emailval,'popupemail','HEIGHT=150,WIDTH=520,scrollbars=yes,resizable=yes,top=50,left=50');
NewPop.window.focus();
}
function PasteItem(num) {

var expdate = new Date (); 
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
cookievar='rotator'+num;

if (!GetCookie(cookievar)) {
	SetCookie(cookievar, 1, expdate);
	}
if (!GetCookie(cookievar)) {
	cur=Math.round(Math.random()*Items.length-1);
	}
	else {
	cur=eval(GetCookie(cookievar));
	}

Items=eval('Items'+num);
if (Items[cur]) {
	document.write(Items[cur]);
	cur=cur+1;
	SetCookie(cookievar, cur, expdate);
	}
	else {
		if (Items[1]) {
		document.write(Items[1]);
		SetCookie(cookievar, 2, expdate);
		}
	}
}
function makeavailable(num,state) {
	obj=eval("document.forms.multiorder.vwquantity"+num)
	obj.disabled=!state;
	((state)?(obj.value=1):(obj.value=0))
}


function PasteComments() {
document.write('<table border="0" cellpadding="0" cellspacing="0"><tr><td height="5" colspan="2"  bgcolor="#F6F9FA"></td></tr><tr><td width="2" nowrap=""  bgcolor="#F6F9FA"></td><td bgcolor="#ffffff" height="20" width="100%"><p class="heading3"><img src="http://edaymovie.com/images/b-pix.gif" border="0" width="3" height="3" hspace="7" align="absmiddle"/>Customer Reviews</p></td><td width="5" nowrap></td>			    </tr><tr><td height="7" bgcolor="#F6F9FA" colspan="2"></td></tr><tr><td bgcolor="#F6F9FA"></td>			    	<td valign="top" width="100%" bgcolor="#F6F9FA" class="marg1">')
for (var i=0; i<mesRecords.length;i++) {
	if (mesRecords[i].indexOf('|')!=-1) {
		tempval=mesRecords[i].split('|');
		document.write('<table border="0" cellpadding="4" cellspacing="1" width="428" bgcolor="#000000" align="center"><tbody bgcolor="F6F9FA"><tr><td width="100%" bgcolor="#002853"><p class="white"><strong>'+tempval[1]+'</strong> ('+tempval[0]+')</p></td><td nowrap align="center">');
		document.write('<img src="http://edaymovie.com/custom/img/stars'+tempval[3]+'0.gif" border="0" align="absmiddle"/>');
		document.write('</td></tr><tr><td colspan="2">'+tempval[2]+'</td></tr></tbody></table><img src="http://edaymovie.com/images/pix.gif" border="0" width="1" height="15"/>');
		}
	}
document.write('</td><td></td></tr><tr><td height="15" colspan="2" bgcolor="#F6F9FA"></td></tr>			</table>');
}
			function checkfileds(obj) {
			var msg='';
			((obj.username.value=='')?(msg+='Pelease enter your name.\n'):(''));
			((obj.vote.value==-1)?(msg+='Pelease select rating.\n'):(''));
			((obj.message.value=='')?(msg+='Pelease enter message.\n'):(''));
			((msg=='')?(obj.submit()):(alert(msg)))
			}
function addtorel() {
	related[CurrItemId]=CurrItem;
	for (var i=1;i<6;i++) {
	cc='rel_'+i;
	if (!GetCookie(cc)) {
		SetCookie(cc, related[CurrItemId]);
		break;
		}
	else {
			if (GetCookie(cc)==related[CurrItemId]) {
			break;
			}
			else {
			if (GetCookie('MaxItem')) {
				gg=true;
				for (var i=1;i<6;i++) {
				tt='rel_'+i;
				if (GetCookie(tt)==related[CurrItemId]) {
					gg=false;
					}
				}
				if (gg) {
				mm=GetCookie('MaxItem');
				kk='rel_'+mm;
				SetCookie(kk, related[CurrItemId]);
				if (eval(mm)!=5) {
					mm=eval(mm)+1;
					}
					else {
					mm=eval(mm);
					mm=1;
					}
				SetCookie('MaxItem', mm);
				break;
				}
				}
			}
		}
	if (i==5 && !GetCookie('MaxItem')) {
		SetCookie('MaxItem', 1);
		}
	}
}
function openImages() {
	var leftPos = (screen.availWidth-900) / 2;
	var topPos = (screen.availHeight-600) / 2;
	var MoreInfo = new Object();
	MoreInfo = window.open('images.html', 'EnlargePicture','width=600,height=500,scrollbars=no,resizable=yes,statusbar=no,location=no,titlebar=0,top=' + topPos + ',left=' + leftPos);
//	MoreInfo.preloadimg(images);
}
function openVideos(num) {
	var leftPos = (screen.availWidth-900) / 2;
	var topPos = (screen.availHeight-600) / 2;
	var MoreInfo = new Object();
	MoreInfo = window.open('videos.html?video='+num, 'EnlargePicture','width=600,height=500,scrollbars=yes,resizable=no,statusbar=no,location=no,titlebar=0,top=' + topPos + ',left=' + leftPos);
}
function openShipping(num) {
	var leftPos = (screen.availWidth-900) / 2;
	var topPos = (screen.availHeight-600) / 2;
	var MoreInfo = new Object();
	MoreInfo = window.open('shipping-calc.html', 'EnlargePicture','width=600,height=500,scrollbars=yes,resizable=no,statusbar=no,location=no,titlebar=0,top=' + topPos + ',left=' + leftPos);
}

function retriveimages(arrname) {
return eval(arrname);
}

function chprice(pr, ro) {
if(ro != 0)
{
	if(pr.toString().indexOf('.') != -1)
	{
	pr = pr.toString().substr(0, pr.toString().indexOf('.')+3);
	}
	
}

if(pr.toString().indexOf('.') != -1)
{
	if(pr.toString().split(".")[1].length == 1)
	{
	pr += '0';	
	}
} else pr += '.00';	
	

obj=document.getElementById('price');
obj.value = '$'+pr;
}
function calcoptions() {
var optval=0;
len=eval("optionvalue.length");
for (i=1;i<len;i++) {
optcheck=eval("optionvalue[i]");
//alert(optcheck);
if (
	optcheck.indexOf('+$')!=-1) {
//	alert('+$')
	optval=optval+eval(optcheck.split('(+$')[1].split(')')[0]);
//	alert(optval);
	}
	else {
		if(optcheck.indexOf('-$')!=-1) {
			optval=optval+eval('-'+optcheck.split('(-$')[1].split(')')[0]);
			}
			else {
			optval=optval+0;
			}
	}
}

return eval(optval);


}

function updateall() {
//alert(calcoptions());
//alert((eval("optionvalue").length>0));
var totalprice;
((eval("optionvalue").length>0)?(totalprice=eval("qtyvalue")*(eval("ipr")+calcoptions())):(totalprice=eval("qtyvalue")*eval("ipr")));
chprice(totalprice, eval("optionvalue").length);
}


