function spawn(url, nameW, w, h) {

	if (navigator.appVersion.indexOf('4') != -1) {

	// Vars for centering the new window on Version 4 Browsers

	x4 = screen.width/2 - (w/2);

	y4 = screen.height/2 - (h/2);

	window.open(url, nameW, 'height='+h+',width='+w+',scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=' + x4 + ',top=' + y4 + '');

	} else {

	window.open(url, nameW, 'height='+h+',width='+w+',scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=150,top=200');

	}

}


var intWW = 520 ;
var intWH = 490 ;
var intWT = 0;              // Popup Top Position
var intWL = 0;              // Popup Left Position
var intSW = screen.width;   // Screen Width
var intSH = screen.height;  // Screen Height

	if (screen) {
		// 1.33_ is a typical screen ratio (width divided by the height)
		// But we'll use 1.4 just to be safe
		if (intSW / intSH > 1.4) {
			intWL = (intSW - intWW) / 4;
			intWT = (intSH - intWH) / 2;
		}
		else {
			intWL = (intSW - intWW) / 2;
			intWT = (intSH - intWH) / 2;
		}
	}

function goToTheDesignMuseum(strURL) {
//if (strName && strName.open) {
//if (strName && strName.open && !strName.closed) {
var strName = 'dmain';
var strOptions = ' scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0';
windowa = window.open(strURL, strName, 'width=' + intWW + ',height=' + intWH + ',left=' + intWL + ',top=' + intWT + ',' + strOptions);
 if (windowa.focus) {
 windowa.focus();
 }
}


function openAWindow(theURL,winName,features) { //v2.1
	awindow = window.open(theURL,winName,features);
	var x = 780;
	var y = 520;
	awindow.moveTo(parseInt((screen.availWidth - x) / 2),
	parseInt((screen.availHeight - y) / 2));
	awindow.focus();
}

function kodedstat() {
	var statimg = new Image;
	statimg.src = 'http://www.koded.com/cgi-bin/stats/designmuseum/stats.cgi?dir=/stats&ref='+escape(top.document.referrer);
}
