var newwindow;
function openPopUp(url,h,w) {
	var winleft = (screen.width - w) / 2;
	var winUp = (screen.height - h) / 2;
	newwindow = window.open(url,'media', 'height='+h+',width='+w+',left=' + winleft + ',top=' + winUp +',resize=no,scrollbars=no');
	if (newwindow.innerWidth){
		iWidth = newwindow.innerWidth;
		iHeight = newwindow.innerHeight;
	}else{
		iWidth = 0;
		iHeight = 0;
		
		if(newwindow){
			alert("exsists");
			iWidth = newwindow.document.body.clientWidth;
			iHeight = newwindow.document.body.clientHeight;		
		}

	}
	iWidth = w - iWidth;
	iHeight = h - iHeight;
	newwindow.resizeBy(iWidth, iHeight);

	if (window.focus) {
		newwindow.focus();
	}
	return false;	
}

var m1 = document.getElementById("mLink1");
var m2 = document.getElementById("mLink2");
var m3 = document.getElementById("mLink3");
var m4 = document.getElementById("mLink4");
var m5 = document.getElementById("mLink5");
var m6 = document.getElementById("mLink6");
var m7 = document.getElementById("mLink7");
var m8 = document.getElementById("mLink8");
var m9 = document.getElementById("mLink9");
var m10 = document.getElementById("mLink10");
var m11 = document.getElementById("mLink11");

m1.onclick = function(){
	openPopUp(this, "370", "370");
	return false;
}
m2.onclick = function(){
	openPopUp(this, "370", "370");
	return false;
}
m3.onclick = function(){
	openPopUp(this, "370", "370");
	return false;
}
m4.onclick = function(){
	openPopUp(this, "370", "370");
	return false;
}
m5.onclick = function(){
	openPopUp(this, "370", "370");
	return false;
}
m6.onclick = function(){
	openPopUp(this, "370", "370");
	return false;
}
m7.onclick = function(){
	openPopUp(this, "370", "370");
	return false;
}
m8.onclick = function(){
	openPopUp(this, "370", "370");
	return false;
}
m9.onclick = function(){
	openPopUp(this, "370", "370");
	return false;
}
m10.onclick = function(){
	openPopUp(this, "370", "370");
	return false;
}
m11.onclick = function(){
	openPopUp(this, "370", "370");
	return false;
}
