

function popupGal(theUrl) {
	var w=300;
	var h=400;
	if (parseInt(navigator.appVersion) >= 4) {
		var l=(screen.width/2)-w;
		var t=(screen.height/2)-h;
	}else {
		var l= 200;
		var t=100;
	}
	
	
	window.open(theUrl,'v',"toolbar=no,width="+w+",height="+w+",left="+l+",top="+t);
}


function fResize(imId){
	i=safeFindObj(imId);
	windowWidth=i.width+6;
	windowHeight=i.height+65;
	
	
	if (parseInt(navigator.appVersion) >= 4) {
		if(windowWidth>screen.width){
			windowWidth=screen.width;
		}
		if(windowHeight>screen.height){
			windowHeight=screen.height;
		}
		window.moveTo((screen.width/2)-(windowWidth/2+10),(screen.height/2)-(windowHeight/2+20));
	}
	
	
	self.resizeTo(windowWidth,windowHeight); 
	
}

	var counter = 0;
function CloseWin() {
	counter++;
	self.close();
}
function FocusWin() {
	if (counter == 0) {
		window.focus();
	}
}
