
function modelesswin(url,mwidth,mheight){
	if (document.all&&window.print) //if ie5
	//resizable parameter value has been changed to 1 for DMT issue no 384 on 09/03/05
		eval('window.showModelessDialog(url,"","help:0;resizable:1;dialogWidth:'+(mwidth)+'px;dialogHeight:'+(mheight+80)+'px;status:no;scroll:no;")')
	else 
    //resizable parameter value has been changed to 1 for DMT issue no 384 on 09/03/05
		eval('window.open(url,"","width='+(mwidth+50)+'px,height='+(mheight+80)+'px,resizable=1,scrollbars=0")')
}

// this function is used for group homepage to indicate different popup width for country online application website
// ary800 to popup a 800 width window, ary1024 to popup a 1024 width window, aryNo no popup
// apphomepop (new Array([element0, element1, ..., elementn), selectedValue)
function apphomepop(ary1024, selectedValue) {		  
	//alert (selectedValue);
	//alert (ary1024.length);
	var is1024 = false;
	
  if (selectedValue != "no") {  	 
  	 // check if 1024 popup 
  	 for (var i=0; i<ary1024.length; i++) {
  	 	if (selectedValue == ary1024[i]) {
  	 		if (i<13){
	  	 		winAllFullpop('/global/function.html?Selected='+ selectedValue);
	  	 	} else {
				if (i<14){
	  	 			win800Fullpop_ne('/global/function.html?Selected='+ selectedValue);
				} else {
					win1024pop_ne('/global/function.html?Selected='+ selectedValue);
				}
	  	 	}
  	 		is1024 = true;
  	 		break;
  		}
  	 }  	 
  	 // default 800 popup
  	 if (! is1024) {win800pop_ne('/global/function.html?Selected='+ selectedValue);}
  }   
  return false;  // No popup require  
}
	
function win400pop(url400pop){
	//resizable parameter value has been changed to 1 for DMT issue no 384 on 09/03/05 
	window.open(url400pop,'SCB400Pop','width=400,height=270,status=yes,resizable=1,top=110,left=200,toolbar=no,menubar=no,scrollbars=yes')
}
function winuser(url410pop){
	//resizable parameter value has been changed to 1 for DMT issue no 384 on 09/03/05 
	window.open(url410pop,'SCB410Pop','width=410,height=446,status=yes,resizable=1,top=110,left=200,toolbar=no,menubar=no,scrollbars=yes')
}

// width 800 expandable
function win800pop(URL) {
      myWindow=window.open(URL, "SCB800Pop","menubar=no,,status=yes,toolbar=no,location=no,directories=no,width=800,height=540,scrollbars=yes,resizable=yes");      
}

// width 800 x 540 non-expandable
function win800pop_ne(URL) {
      myWindow=window.open(URL, "SCB800PopNe","menubar=no,,status=yes,toolbar=no,location=no,directories=no,width=800,height=540,scrollbars=yes,resizable=no");      
}
// width 800 x 600 non-expandable
function win800Fullpop_ne(URL) {
      myWindow=window.open(URL, "SCB800FullPopNe","menubar=no,,status=yes,toolbar=no,location=no,directories=no,width=800,height=600,scrollbars=yes,resizable=no");      
}
// width 768 expandable
function ibankpop(URL) {
      myWindow=window.open(URL, "ibankPop","menubar=no,status=yes,toolbar=no,location=no,directories=no,width=768,height=550,scrollbars=yes,resizable=no");      
}

// width 1024 non-expandable
function win1024pop_ne(URL) {
      myWindow=window.open(URL, "SCB1024PopNe","menubar=no,,status=yes,toolbar=no,location=no,directories=no,width=1024,height=700,scrollbars=yes,resizable=no");      
}

// width 730 to allow a left shift position to avoid total block of the mother screen
function newwin(urlnewwin){
	//resizable parameter value has been changed to 1 for DMT issue no 384 on 09/03/05 
	window.open(urlnewwin,'SCBnewwin','width=730,status=yes,resizable=1,top=50,left=50,toolbar=yes,menubar=yes,scrollbars=yes,location=yes')
}
// full size window expandable
function winAllFullpop(URL) {
      myWindow=window.open(URL, "SCBAllFullPop","menubar=no,,status=yes,toolbar=no,location=no,directories=no,scrollbars=yes,resizable=yes");      
}
function openNewWin(URL) {
	window.open(URL);
}

