<!--

// default values
var x = 0, y = 0; 
var remoteWindow;

function popWin(theURL,winName,w,h,features,winOffset) {

		if(typeof(winOffset) != "undefined"){
			x=y=winOffset;
		}else{
			x=y=20;
		}
		// if WinIE	
		/*
		if(remoteWindow && window.print){
			
			//remoteWindow.resizeTo(w,h);
			//remoteWindow.moveTo(x,y)
			if(remoteWindow.name == winName){
				alert('closing');
				remoteWindow.close();
			}
		}
		*/
	
 		remoteWindow = window.open(theURL,winName,'width='+w+',height='+h+','+ features +',top='+y+',screenY='+y+',left='+x+',screenX='+x);
		//if (remoteWindow.opener == null) remoteWindow.opener = self;
		remoteWindow.focus();
}

function popWinCentered(theURL,winName,w,h,features) {
		// get the width of the display
		var screen_width=window.screen.width 
		var screen_height=window.screen.height 

		// determine the requested placement
		var x = Math.round((screen_width-w)/2) 
		var y = Math.round((screen_height-h)/2) 

		if(remoteWindows[winName]){
			remoteWindows[winName].close();
		}
 		remoteWindows[winName] = window.open(theURL,winName,features + ",width="+w+",height="+h+',top='+y+',screenY='+y+',left='+x+',screenX='+x);
		if (remoteWindows[winName].opener == null) remoteWindows[winName].opener = self;
		remoteWindows[winName].focus();
}

function getResized(target){
	if(target== null){
		target = this;
	}else{
		target = eval('parent.'+target);
	}
	if (document.all) {
		x = target.screenLeft;
		y = target.screenTop;
	} else if (document.layers) {
		x = target.screenX;
		y = target.screenY;
	}
}

function getCentered(w,h){
	// get the width of the display
	screen_width=window.screen.width 
	screen_height=window.screen.height 

	// determine the requested placement
	x = Math.round((screen_width-w)/2) 
	y = Math.round((screen_height-h)/2)
}

/* call-links */
function launchCallLinkWindow(clID){
	popWin('/CallLinks/?id=' + clID,'callLinkWin',340,500,'scrollbars=1,resizable=1,status=1');
}
//-->
