function popupOpen(){
	var url = "family.html";
	var indent = 70;
	var w_name = "tkWindow";
	var osName = navigator.userAgent.toUpperCase();
	var aName = navigator.appName.toUpperCase();
	if(osName.indexOf("WIN") >= 0){
		if(aName.indexOf("EXPLORER") >= 0){
			var winName = w_name;
			var w_width = "width=" + screen.availWidth;
			var w_height =",height=" + screen.availHeight;
			var w_left = ",left=" + 0;
			var w_top = ",top=" + 0;
			var w_option = ",scrollbars=0,menubar=0,status=0,resizable=0";
			var features = w_width + w_height + w_left + w_top + w_option;
			winName = window.open(url,winName,features);
			winName.moveTo(0,0);
			winName.resizeTo(screen.availWidth,screen.availHeight);
			if(window.focus){
				winName.focus();
			}
		}else{
			var winName = w_name;
			var w_width = "width=" + screen.availWidth;
			var w_height =",height=" + screen.availHeight;
			var w_left = ",left=" + 0;
			var w_top = ",top=" + 0;
			var w_option = ",scrollbars=0,menubar=0,status=0,resizable=0";
			var features = w_width + w_height + w_left + w_top + w_option;
			winName = window.open(url,winName,features);
			winName.moveTo(0,0);
			winName.resizeTo(screen.availWidth,screen.availHeight);
			if(window.focus){
				winName.focus();
			}
		}
	}else if(osName.indexOf("MAC") >= 0){
		if(aName.indexOf("EXPLORER") >= 0){

			var winName = w_name;
			var w_width = "width=" + screen.availWidth;
			var w_height = ",height=" + screen.availHeight - indent;
			var w_left = ",left=" + 0;
			var w_top = ",top=" + 0;
			var w_option = ",scrollbars=0,menubar=0,status=0,resizable=0";
			var features = w_width + w_height + w_left + w_top + w_option;
			winName = window.open(url,winName,features);
			winName.moveTo(0,0);
			winName.resizeTo(screen.availWidth,screen.availHeight - indent);
			if(window.focus){
				winName.focus();
			}
		}else if(osName.indexOf("SAFARI") >= 0){
				var winName = w_name;
				var w_width = "width=" + screen.availWidth;
				var w_height = ",height=" + screen.availHeight;
				var w_left = ",left=" + 0;
				var w_top = ",top=" + 0;
				var w_option = ",scrollbars=0,menubar=0,status=0,resizable=0";
				var features = w_width + w_height + w_left + w_top + w_option;
				winName = window.open(url,winName,features);
				winName.moveTo(0,0);
				winName.resizeTo(screen.availWidth,screen.availHeight);
				if(window.focus){
					winName.focus();
				}
		}else{
				var winName = w_name;
				var w_width = "width=" + screen.availWidth;
				var w_height = ",height=" + screen.availHeight;
				var w_left = ",left=" + 0;
				var w_top = ",top=" + 0;
				var w_option = ",scrollbars=0,menubar=0,status=0,resizable=0";
				var features = w_width + w_height + w_left + w_top + w_option;
				winName = window.open(url,winName,features);
				winName.moveTo(0,0);
				winName.resizeTo(screen.availWidth,screen.availHeight);
				if(window.focus){
					winName.focus();
				}
		}
	}
}

function windowClose(){
	window.opener = window;
	var win = window.open( location.href, "_self" );
	win.close(); 
}

function openFamilyTemp(size, width, height) {
	var browser = navigator.appName;
    	width = 540;
    	height = 480;
    	swidth = ((screen.width/2)-(width/2));
    	sheight = ((screen.height/2)-(height/2));
    	macwidth = width-16;
    	macheight = height-16;
      
    	if ((browser == "Microsoft Internet Explorer") && (navigator.appVersion.lastIndexOf('Mac') != -1)){ 
    		window.open('http://www.may-j.com/popup/link.html','link','width='+ macwidth +',height='+ macheight +',top='+ sheight +',left='+ swidth +',scrollbars=no,resizable=no');
    	}
    	else
    	{
    		window.open('http://www.may-j.com/popup/link.html','link','width='+ width +',height='+ height +',screenY='+ sheight +',screenX='+ swidth +',top=' + sheight + ',left=' + swidth + ',scrollbars=no,resizable=no');
    	}
}

