var version4 = false;
if(navigator.appVersion.charAt(0) >= "4") { version4 = true; }

var cardWin;
var sWidth = window.screen.availWidth;
var sHeight = window.screen.availHeight;
var def_width=400;
var def_height=300;

// open new remote window
function openRemote(url, name, width, height, evnt) {
 
 if (width > sWidth){
   width = def_width;
 }
 if (height > sHeight){
   height = def_height;
 }

 var thisTop=sHeight/2 - height/2 - 50;
 var thisLeft=sWidth/2 - width/2 - 20;

 var properties = "toolbar=no,location=no,menubar=yes,resizable=yes,scrollbars=yes,status=no";  
 
 if(evnt != null) {
     
       
     properties = properties+",width="+width +",left="+ thisLeft;
     properties = properties+",top="+thisTop+",height="+height;
  
 }
 else{
   properties = properties+",width="+ width +",left=10" +",top=10,height="+height;
 }

     
 cardWin = window.open(url, name, properties);
//cardWin.focus();
 

} 



