function winOpen() {
	var a = arguments;
	var n,f,s,w,h,t,l;
	n = (a[1]) ? a[1] : 'child';
	f = (a[6]) ? a[6].toString() : null;
	s = (f && f.search(/scrollbars=(1|true)/) != -1);
	w = getWidth(a[2],s);
	h = a[3];
	t = (a[4]) ? a[4] : 0;
	l = (a[5]) ? a[5] : 0;
	child = window.open(a[0],n,'width='+w+',height='+h+',top='+t+',left='+l+',directories=0,'+f);
	setTimeout('child.focus()',100);
	if(f && f.search(/temp=(1|true)/) != -1) window.onfocus = function(){ if(window.child) child.close(); child = null };
}

function UA(){
	var v = navigator.appVersion.toLowerCase(), u = navigator.userAgent.toLowerCase(), n = navigator.appName;
	this.full = navigator.appVersion.toLowerCase(), u = navigator.userAgent.toLowerCase(), n = navigator.appName;
	this.mac = (v.indexOf("mac")+1);
	this.win = (v.indexOf("win")+1);
	this.safari = (u.indexOf("safari")+1);
	this.nn = (n == "Netscape");
	this.ie = (n == "Microsoft Internet Explorer");
}
var ua = new UA();

function getWidth(w,s) {
	if(s) {
    if(ua.mac) {
    	if(ua.nn) w += 17;
			if(ua.safari)	w -= 4;
    }
    if(ua.win) w += 16;
  } else {
		if(ua.safari)	w -= 2;	
  }
return w;
}