// all popup calls goes here	
//
function popup(url, w, h, f, t, l){
	if(navigator.userAgent.indexOf("Safari") != -1){
		w = w - 2;
	}
	var day = new Date();
	var id = day.getTime();
	var name = "steam_" + id;
	
	if(l == null){
		l = Math.round((screen.availWidth-w)/2);
	}
	if(t == null){
		var t = Math.round((screen.availHeight-h)/2);
	}
	var features = "width="+w+",height="+h+",left="+l+",top="+t+",screenX="+l+",screenY="+t+",toolbar=no,location=no,status=no,menubar=no,history=no,titlebar=no,alwaysRaised";

	if(f != null && f != "undefined"){
		features += "," + f;
	}
	
	eval("var win"+id+" = window.open('"+url+"', '"+name+"', '"+features+"');");
	eval("win"+id+".moveTo("+l+","+t+");");
	eval("win"+id+".focus();");
}
