// 获得cpath路径
var cpath = getCpath();

function openWindow(url1){
   //showModalDialog(url1);
   //return window.open (url1, '', 'height=400, width=600,toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, status=yes');
   return window.open (url1, '', 'height=500, width=750, left=200,top=100 toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, status=yes,center=yes');
}
function openSmallWindow(url1){
   //showModalDialog(url1);
   //return window.open (url1, '', 'height=400, width=600,toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, status=yes');
   return window.open (url1, '', 'height=300, width=400, left=300,top=300 toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, status=yes,center=yes');
}

//@para1  url : the contend of the url will be shown at ceter of a dialog
//@para2  inputObject :The  object is thrown to the page buddled with the url(para1)
//note: inputObject  can be all objects recognized by javascript such as Array, window,document and so on.
function openInputDiaDefault(url,inputObj){
	openInputDialog(url,inputObj,"dialogHeight:500px;dialogWidth:600px;center=yes");
}

//@para1  url : the contend of the url will be shown at ceter of a dialog
//@para2  inputObject :The  object is thrown to the page buddled with the url(para1)
//	note: inputObject  can be all objects recognized by javascript such as Array, window,document and so on.
//@para3  feature: it's parameter for the dialog's aspect.It's exacly as same as the parameter taken by
//showModalDialog.

function openInputDialog(url,inputObj,feature){
    ar = new Array();
    ar[0] = url;
    ar[1] = inputObj;
	return  showModalDialog(cpath+"/common/popinput.htm",ar,feature);
}


function openDialog(urlStr){
 var ret = showModalDialog(cpath+"/common/popdialog.jsp",urlStr,"dialogHeight:600px;dialogWidth:650px;center=yes");
 return ret;
}

function openDialogSmall(urlStr){
 var ret = showModalDialog(cpath+"/common/popdialog.jsp",urlStr,"dialogHeight:400px;dialogWidth:600px;center=yes");
 return ret;
}

//sizeStr = "dialogHeight:600px;dialogWidth:600px;center:yes"
function openDialogSize(urlStr,sizeStr){
 var ret = showModalDialog(cpath+"/common/popdialog.jsp",urlStr,sizeStr);
 return ret;
}

function openModelessDialogSize(urlStr,sizeStr){
 var ret = showModelessDialog(cpath+"/common/popdialog.jsp",urlStr,sizeStr);
 return ret;
}

function dialogReturn(value1){
  window.parent.returnValue = value1;
  window.parent.close();
}

function openModelessWindow(url1){
   showModelessDialog(url1);
   //window.open (url1, '', 'height=400, width=600,toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, status=yes');
}

function openNamedWindow(url1,name){
   window.open (url1, name, 'height=400, width=600,toolbar=no, menubar=no, scrollbars=yes,resizable=yes,location=no, status=yes');
}
