var newwin = 0;
var full = 0;
//===================================================================================================================
//function to open window fullscreen

function openFullScreen (url, name) {
    winW = 0;
    winH= 0;
	var windowName = name;

	if (navigator.appName == 'Microsoft Internet Explorer' && (navigator.platform.substring(0,3) == 'Win')) {
		wComp=10;
		hComp=57;
	}
	else if (navigator.appName == 'Netscape' && navigator.platform.substring(0,3) == 'Win') {
		wComp=12;
		hComp=59;
	}
	else if (navigator.platform == 'MacPPC' && navigator.appName == 'Netscape'){
		wComp=13;
		// extra 18 px for net on mac (don't know why?? but works)
		hComp=49;
	}
	else {
		wComp=13;
		hComp=31;		
	}

	winW=screen.width-wComp;
	winH=screen.height-hComp;

	finalFeature="left=0,top=0,width=" + winW + ",height=" + winH + ",scrollbars=no ";
	full=window.open(url,windowName,finalFeature);
	full.focus();

	if(navigator.platform.indexOf("MacPPC")!=-1 && navigator.appName.indexOf('Microsoft')!=-1){
		full.resizeTo(winW,winH);
	}
}

//===================================================================================================================
function centerPopUp(mypage, myname, w, h) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=0,resizable=0';
  newwin = window.open(mypage, myname, winprops);
  if (newwin.opener == null) { // for Nav 2.0x 
   newwin.opener = self; // this creates and sets a new property 
  }
  if (parseInt(navigator.appVersion) >= 4) { newwin.window.focus(); }
}
/*
function centerPopUp(url, name, width, height){
  var url = url;
  var name = name;
  var left = (screen.width/2) - (width/2);
  var top = (screen.height/2) - (height/2);
  var features;
  features = "toolbar=no,location=no,menubar=no,scrollbars=no,resizable=no,";
  features += "width="+ width + ", height=" + height + ",left=" + left + ",top=" + top;
  newwin = window.open(url,name, features);
  if (newwin.opener == null) { // for Nav 2.0x 
   newwin.opener = self; // this creates and sets a new property 
  }
  newwin.focus();
}
*/
//====================================================================================================================

function closeWin(){
  window.close();
  newwin = 0;
}

//====================================================================================================================
function centerPopUpScroll(mypage, myname, w, h) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=yes,resizable=0';
  newwin = window.open(mypage, myname, winprops);
  if (newwin.opener == null) { // for Nav 2.0x 
   newwin.opener = self; // this creates and sets a new property 
  }
  if (parseInt(navigator.appVersion) >= 4) { newwin.window.focus(); }
}

/*
function centerPopUpScroll(url, name, width, height){
  var width = width;
  var height = height;
  var url = url;
  var name = name;
  var left = (screen.width/2) - (width/2);
  var top = (screen.height/2) - (height/2);
  var features = "toolbar=no, location=no, menubar=no, scrollbars=yes, resizable=no, ";
  features += "width= "+ width + ", height=" + height + ",left= " + left + ",top= " + top;
  newwin = window.open(url,name, features);
  if (newwin.opener == null) { // for Nav 2.0x 
   newwin.opener = self; // this creates and sets a new property 
  }
  newwin.focus();
}
*/
//=======================================================================================================================

function alertMessage(message){
  alert(message);
}

