var arrRet;

function openwindow (url,wtitle,xsize,ysize)
{

var x,y, windowsize;
x = Math.round ((screen.width - xsize)/2);
y = Math.round ((screen.height - ysize)/2);

	windowsize = 'left='+x+',top='+y+',width=' + xsize + ', height=' + ysize + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0';
	open_window = window.open(url, wtitle, windowsize );

	if(open_window != null) open_window.focus();
	if(open_window.opener == null ) open_window.opener = window;
}

function modalpopup(url,param,xsize,ysize) {
x = Math.round ((screen.width - xsize)/2);
y = Math.round ((screen.height - ysize)/2);

var isXPSPV2 = (navigator.appVersion.indexOf("SV1")) >= 0 ? 1 : 0;
if (isXPSPV2){
ysize = ysize + 20;
}
	windowsize = "dialogHeight:"+ysize+"px; dialogWidth:"+xsize+"px;edge:Raised;center:Yes;scroll:No;help:No;resizable:No;status:No;"
	arrRet = window.showModelessDialog(url,param,windowsize);
	window.status = "";
	//if(arrRet != null) return arrRet;
}



function showModelessResize(url,xsize,ysize,resize) {
x = Math.round ((screen.width - xsize)/2);
y = Math.round ((screen.height - ysize)/2);

	windowsize = "dialogHeight:"+ysize+"px; dialogWidth:"+xsize+"px;edge:Raised;center:Yes;scroll:No;help:No;resizable:"+resize+";status: No;"
	var arrRet = window.showModelessDialog(url,"",windowsize);
}


function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
//document.onfocusin=bluring; 

function linkReplace(url){
hiddenFrame.location.replace (url);
}