var win=null;
var isMac = (navigator.appVersion.indexOf("Mac") != -1)?true:false;

function NewWindowImg(mypage,myname,w,h,scroll,pos){
   if(pos=="center"){
    LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=(screen.height)?(screen.height-h)/2:100;
   }
   
   if(pos=="max"){
    LeftPosition=0;
	w = screen.width-16;
	TopPosition=0;
	h=screen.height-128;
   }
   
  var settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
  win=window.open("",myname,settings);
  if (mypage.indexOf(".fodoc") > 0)
    win.document.write("<img src='" + mypage +"'>")
  else
    win.document.write("<img src='/SuperCenter/OpenFile.asp?file=" + mypage +"'>")
  win.focus();
}

function NewWindowPage(mypage,myname,w,h,scroll,pos){
   if(pos=="center"){
    LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=(screen.height)?(screen.height-h)/2:100;
   }
   
   if(pos=="max"){
    LeftPosition=0;
	w = screen.width-16;
	TopPosition=0;
	h=screen.height-128;
   }
   
  var settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=' + scroll + ',scrolling=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
  win=window.open(mypage,myname,settings);
  win.focus();
}

function SendToaFriend(url){
  	  	NewWindowPage(url,"ecophon",400,300,"no","center");
}


function Pagepop(filename){
  	  	NewWindowPage(filename,"ecophon",600,600,1,"center");
}

function imgpop(filename){
  	  	NewWindowImg(filename,"ecophon",600,600,1,"center");
}
