﻿

var popUpWin=0;
function popUpFlashWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = window.open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function popUpFlashWindowHTTPS(URLStr, left, top, width, height)
{
  var URLStrHTTPS = new String(window.location);

  var slash_index = URLStrHTTPS.lastIndexOf("/");
  URLStrHTTPS = URLStrHTTPS.substring(0, slash_index + 1);

  URLStrHTTPS = URLStrHTTPS.replace("http://", "https://");
  
  URLStrHTTPS = URLStrHTTPS + URLStr;
  
  //alert(URLStrHTTPS);
  
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = window.open(URLStrHTTPS, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

//function for interstitial page


function jump3(where) { 
	openNewWindow(where,"temp",500,298,0,0,"none"); 
}

/*
function jump(where) { 
	var thePage = "zosyn_exit_notice.aspx?" + where; 
	openNewWindow(thePage,"temp",500,298,0,0,"none"); 
}
function jump2(where) {
	openNewWindow(where,"outside",800,600,0,0,"full");
}
*/
//open window function
function openNewWindow(page,name,width,height,top,left,propSet) {

	var windowProps = new Array (8);

	windowProps[0] = "resizable=yes";
	windowProps[1] = "scrollbars=yes";
	windowProps[2] = "titlebar=yes";
	windowProps[3] = "toolbar=yes";
	windowProps[4] = "menubar=yes";
	windowProps[5] = "location=yes";
	windowProps[6] = "status=yes";
	windowProps[7] = "directories=yes";
	
	var myProps = "";
	var mySize = "";
	
	if (propSet == 'one') {
		 myProps = ',' + windowProps[0] + ',' + windowProps[1];
	} else if (propSet == "full") {
		myProps = ',' + windowProps.join(",");
	} else if (propSet == "print") {
		myProps = ',' + "scrollbars=yes";
	} else {
		myProps = "";
	}	
	
	if ((width > 50)||(height > 50)) {
		var mySize = 'width=' + width + ',' + 'height=' + height + ',' + 'top=' + top + ',' + 'left=' + left;
	}
	
	var myString = mySize + myProps;
	window.open(page,name,myString);
	
}