// JavaScript Document


var viewStudio = null;

function popup(url){

	var str = centerWindow(732,380);

	viewStudio = window.open(url, "viewStudio",
"location=no,menubar=no,resizable=no,scrollbars=no," + str);
	viewStudio.focus();

}


function centerWindow(width,height) {

	if(window.screen){

		if(screen.availHeight-90 <= height){

			height = screen.availHeight - 90;

		}

		if(screen.availWidth-10 <= width){

			width = screen.availWidth - 10;

		}

	}

	var str = "height=" + height + ",innerHeight=" + (height+90);
	str += ",width=" + width + ",innerWidth=" + width;

	if (window.screen) {

		var ah = screen.availHeight - 90;
		var aw = screen.availWidth - 10;

		var xc = (aw - width) / 2;
		var yc = (ah - height) / 2;

    	str += ",left=" + xc + ",screenX=" + xc;
    	str += ",top=" + yc + ",screenY=" + yc;
  	}

  	return str;

}


function popup2(url){

	var str = centerWindow(700,380);

	viewStudio = window.open(url, "viewStudio",
"location=no,menubar=no,resizable=no,scrollbars=no," + str);
	viewStudio.focus();

}

