var popuWin = 0;
screen_center_x = top.screen.availWidth/2;
screen_center_y = top.screen.availHeight/2;
function popup(path, x, y, name){
	try{if(popuWin){if(typeof(popuWin == Object)){if(!popuWin.closed)popuWin.close();}}}catch(error){}
	popuWin = window.open(path,name,'status=1,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,'+
	'resizable=1,copyhistory=0,width='+x+'px,height='+y+'px, left='+(screen_center_x - x/2)+'px, top='+(screen_center_y - y/2)+'px');
	popuWin.self.focus();
} 
function seek(){var path = 'search.php';	popup(path, 400, 430);}
function zoom(recid, imnum){
	if(!imnum)imnum = 1;
	var path = '../imgpreview.php?image=photos/actiors/'+recid+'_'+imnum+'_big.jpg';
	popup(path, 10, 10, "img");
}


function zoom_detail(recid){

	
	popup(recid, 720, 570, "detail");
}

function navigate(start_rec){f = document.forms['Options'];if(start_rec){f.start_rec.value = start_rec;f.submit();}}
function addToCart(addid){
	if(addid){
		var path = 'cart_popup.php?ids='+addid.toString()+'';
	}else{
		var f=document.forms['Options'];
		var path = 'cart_popup.php?ids='
		for( var i = 0; i < f.elements.length; i++ ){
			if(	f.elements[i].type == 'checkbox' ){
				if(	f.elements[i].checked )path += f.elements[i].value +',';
			}
		}
	}
	if(path != 'cart_popup.php?ids='){
		if(path.charAt(path.length-1)==',')path = path.substr(0, path.length-1);//alert(path);
		popup(path, 350, 460);
	}
}