// JavaScript Document

// JavaScript Document
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function NewWindow(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+',resizable'
win = window.open(mypage,myname,settings)
}

function OpenAdmin(theURL){
	LeftPosition = (screen.width) ? (screen.width)-510 : 0;
	cmsheight = (screen.height) ? (screen.height)*.75 : 550;
	settings = 'height='+cmsheight+',width=500,top=0,left='+LeftPosition+',scrollbars=yes,resizable=yes'
	win = window.open(theURL,'viewit',settings)
}


function add_product() {
	document.cart_quantity.submit();
}

var win = null;
function paypal(mypage){
h = 500;
w = 1000;
myname = 'paypal';
LeftPosition = (screen.width) ? (screen.width-w)/2 : 100;
//TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
TopPosition = 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=yes'
win = window.open(mypage,myname,settings)
}

function OpenPlayer(id){
h = 155;
w = 320;
mypage = 'player.php?pid='+id;
myname = 'player';
LeftPosition = (screen.width) ? (screen.width-w)-50 : 700;
//TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
TopPosition = 50;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=no'
win = window.open(mypage,myname,settings)
if (window.focus) {win.focus()} 
}



// store pop up
function sendme() 
{ 
    var sel = document.forms[0].pid.selectedIndex;
	var pid = document.forms[0].pid.options[document.forms[0].pid.options.selectedIndex].value;
	var id = document.forms[0].id.value;
	if (sel == "") {
         
		 //header ("Location: poduct.php?id=<?php echo $id ?>&error=pitch");
		 alert("Please select an option");
		 
    } else {
		
		//alert("ID: "+id+" PID: "+pid);
		window.open("paypal.php?pid="+pid+"&id="+id+"","paypal","width=900,toolbar=0"); 
    	//var a = window.setTimeout("document.buyform.submit();",500);
	
	}
	return false;
} 

// store pop up
function sendmesingle() 
{ 

	var pid = document.forms[0].pid.value;
	var id = document.forms[0].id.value;
		
	//alert("ID: "+id+" PID: "+pid);
	window.open("paypal.php?pid="+pid+"&id="+id+"","paypal","width=900,toolbar=0"); 
    //var a = window.setTimeout("document.buyform.submit();",500);
	
	return false;
} 


function EJEJC_lc(th) { return false; }
document.write("<scr"+"ipt src='" + document.location.protocol + "//www.e-junkie.com/ecom/box.js' type='text/javascript'></scr"+"ipt>");