//function openDialogWin(Err,bC,EP)
//{var RV=OW("Message","800","400","","","no","no","no","no","no",UR,"modal");}

function OpenErrorWin(strName,iW,iH,TOP,LEFT,R,S,SC,T,TB,URL,TYPE,dArg)
{
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
//LEFT = screen.availWidth - (screen.availWidth - 150);
//screen.availWidth-10, screen.availHeight-10
if (TYPE=="modal" || TYPE=="modalIframe")
{
var sF=""
var _rv
sF+=T?'unadorned:'+T+';':'';
sF+=TB?'help:'+TB+';':'';
sF+=S?'status:'+S+';':'';
sF+=SC?'scroll:'+SC+';':'';
sF+=R?'resizable:'+R+';':'';
sF+=iW?'dialogWidth:'+iW+'px;':'';
sF+=iH?'dialogHeight:'+iH+'px;':'';
sF+=TOP?'dialogTop:'+TOP+'px;':'';
sF+=LEFT?'dialogLeft:'+LEFT+'px;':'';
if (TYPE=="modal")
{
	if (agt.indexOf("msie") > 0)
	{_rv=window.showModalDialog(URL,dArg?dArg:"",sF);}
}
else
{
var da=new Object()
da.w=iW;
da.h=iH;
da.url=URL;
_rv=window.showModalDialog('iframe.cfm?urlStr='+URL,da,sF);
}

if ("undefined" == typeof(_rv) )
{
var sF=""
sF += iW?'width='+iW+',':'';
sF+=iH?'height='+iH+',':'';
sF+=R?'resizable='+R+',':'';
sF+=S?'status='+S+',':'';
sF+=SC?'scrollbars='+SC+',':'';
sF+=T?'titlebar='+T+',':'';
sF+=TB?'toolbar='+TB+',':'';
sF+=TB?'menubar='+TB+',':'';
sF+=TOP?'top='+TOP+',':'';
sF+=LEFT?'left='+LEFT+',':'';
var HMW=window.open(URL?URL:'about:blank',strName?strName:'',sF);
if ( (document.window != null) && (!HMW.opener) )
HMW.opener=document.window;
HMW.focus();
}


if ("undefined" != typeof(_rv) )
return _rv;
}
else
{
var sF=""
sF += iW?'width='+iW+',':'';
sF+=iH?'height='+iH+',':'';
sF+=R?'resizable='+R+',':'';
sF+=S?'status='+S+',':'';
sF+=SC?'scrollbars='+SC+',':'';
sF+=T?'titlebar='+T+',':'';
sF+=TB?'toolbar='+TB+',':'';
sF+=TB?'menubar='+TB+',':'';
sF+=TOP?'top='+TOP+',':'';
sF+=LEFT?'left='+LEFT+',':'';
var HMW=window.open(URL?URL:'about:blank',strName?strName:'',sF);
if ( (document.window != null) && (!HMW.opener) )
HMW.opener=document.window;
HMW.focus();
}
}


function Err(URL,bC,msg,title,h,w)
{
	if ('undefined' == typeof(h))
		h = 217
	if ('undefined' == typeof(w))
		w = 399
	if (URL=='')
		URL = '/confirmation.cfm?msg='+msg+'&title='+title+'&r='+Math.round(Math.random()*1000000);
	
	bC=bC?1:0;
	var RV=OpenErrorWin("Error",w,h,"","","no","no","no","no","no",URL,"modal");
	if ( !RV.help && !RV.url )
		return RV.state;
	if (RV.help)
		CPH(RV.help);
	if (RV.url)
	{
		if ('undefined' != typeof(DoSave) )
		DoSave(RV.url);
	else
		location.href=RV.url;
	}
}

function popup(link,window_name,width,height){
window.open(link,window_name,'width='+width+',height='+height+',scrollbar=1, resizeable=1');
}
