function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function openpopup(imgsrc,x,y)
{
	x += 20;
	y += 20;
	winpops=window.open(imgsrc,"winpops","top=0,left=0,width=" + x + ",height=" + y + ",toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no")
}

function printableWindow(docName)
{
	var printWindow = null;
	var verStr=navigator.appVersion;
	var windowFeatures = "width=600,toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no";
	printWindow=window.open(docName,"MastersMiracle", windowFeatures);
	printWindow.focus();
	
	if (verStr.indexOf('Macintosh') !=-1) {
		return;
	}
	
	printWindow.print();

}

function imageProfilesWindow(docName)
{
	var imgWindow = null;
	var verStr=navigator.appVersion;
	var windowFeatures = "width=665 height=401,toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no";
	imgWindow=window.open(docName,"MastersMiracle", windowFeatures);
	imgWindow.focus();
	
}

var acePopupWindow=null;
function acePopup(mypage,myname,w,h,pos,infocus){
	if(pos=='random'){
		LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
		TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}
	
	if(pos=='center'){
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!='center' && pos!='random') || pos==null){
		LeftPosition=100;TopPosition=100;
	}
	
	settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
	acePopupWindow=window.open('',myname,settings);
	
	if(infocus=='front'){
		acePopupWindow.focus();
		acePopupWindow.location='http://www.openthedoorsystem.com/MM2/speed.asp';
	}
} 

var acePopupWindow2=null;
function acePopup2(mypage,myname,w,h,pos,infocus)
{
	if(pos=='random'){
		LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
		TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}
	
	if(pos=='center'){
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;
	} else if((pos!='center' && pos!='random') || pos==null){
		LeftPosition=100;TopPosition=100;
	}
	
	settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
	acePopupWindow2=window.open('',myname,settings);
	
	if(infocus=='front'){
		acePopupWindow2.focus();
		// acePopupWindow2.location='http://www.tmmvideos.com/index.asp';
		acePopupWindow2.location='http://www.nrvideos.com/index.asp?usrDist=' + mypage;
	}
}

var acePopupWindow3=null;
function acePopup3(mypage,myname,w,h,pos,infocus){
	if(pos=='random'){
		LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
		TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}
	
	if(pos=='center'){
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!='center' && pos!='random') || pos==null){
		LeftPosition=100;TopPosition=100;
	}
	
	settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
	acePopupWindow3=window.open('',myname,settings);
	
	if(infocus=='front'){
		acePopupWindow3.focus();
		acePopupWindow3.location='http://www.nrvideos.com/intro/index.asp?usrDist=' + mypage;
	}
} 