/*
	Copyright Binfinity Web, Inc. 2003-2007. All rights reserved.
*/

var CurStorePopupWin = null;
var helpStoreWin = null;

var storewin = null;


var objWindow = parent.objPopWindow;

function gotovendorprod(vid, pid) {
	var sattrib, height, width;
	
	height = Math.min(800,screen.availHeight);
	width = Math.min(1000, screen.availWidth);
	sattrib = "width= " + width + ",height=" + height;
	//try to right justify the window and put it at top of screen
	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = aw - width;
		var yc = ah - height;
		sattrib += ",left=" + xc + ",screenX=" + xc;
		sattrib += ",top=0,screenY=0";
	}	
	sattrib += ",toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1"
	
	var sUrl = "shopvendprod.php?vendid=" + vid + "&prodid=" + pid;
	var sWindowName = "stpopup";
		
	if (objWindow.win != null  && !objWindow.win.closed) {
		 objWindow.win.close();
	}
	
	objWindow.win = window.open(sUrl , sWindowName, sattrib);
	
	//if (objWindow.win != null  && !objWindow.win.closed) objWindow.win.focus();
	
	//objWindow.win.focus();
	
	setTimeout("if (objWindow.win != null  && !objWindow.win.closed) objWindow.win.focus();",1000);
		
}


function closestorewin() {
	if (storewin != null) {
		if (!storewin.closed) {
			storewin.close();
		}
		storewin = null;
	}

}


