//new Array(CSSlideNewWindow,/*URL*/ 't2.html','',500,300,false,false,false,false,false,false,false);


// '0'     '1'   '2'   '3' '4' '5'      '6'
// 'self' 'url' 'name' 'h' 'w' 'reszise' 'scrollbar'  

// '7'        '8'       '9'           '10'       '11'
// 'menubar' 'toolbar' 'directories' 'location' 'status'


//newwin(Array('newwin',false,'win',50,30,false,false,false,false,false,false,false));

function newwin(action) {
  var wh = "";
  
  if (action[7] || action[8] || action[9] == true) {
    wh=action[4]-125;
  } else {
    wh = action[4];
  }

  var wf = "";	
  wf = wf + "width=" + action[3];
  wf = wf + ",height=" + wh;
  wf = wf + ",resizable=" + (action[5] ? "yes" : "no");
  wf = wf + ",scrollbars=" + (action[6] ? "yes" : "no");
  wf = wf + ",menubar=" + (action[7] ? "yes" : "no");
  wf = wf + ",toolbar=" + (action[8] ? "yes" : "no");
  wf = wf + ",directories=" + (action[9] ? "yes" : "no");
  wf = wf + ",location=" + (action[10] ? "yes" : "no");
  wf = wf + ",status=" + (action[11] ? "yes" : "no");		

  //alert(wf);  
  
  if(navigator.appVersion.charAt(0) >=4) {
    var sw=screen.width-20;
    var sh=screen.height;
    var newwidth=action[3]; 
    var newheight=action[4];
    var positionleft=(sw-newwidth)/2;
    var positiontop=""
    
    if (action[7] || action[8] || action[9] == true) { 
      positiontop=(sh-newheight)/3; 
    } else { 
      positiontop=(sh-newheight)/2.5;
    }
  }
  
  //alert(wf);  
  
  newwindow=window.open(action[1],action[2],wf); 
  
    if (action[1] == "kjadskjflkdj"){
  
      w = '<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD XHTML 1.0Transitional\/\/EN" "http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd"><html xmlns="http:\/\/www.w3.org\/1999\/xhtml">      <head><title>Popup<\/title><\/head><body style="overflow:hidden;background-image:url('+action[0]+'); background-repeat: no-repeat;"><\/body><\/html>';
      //<p><div align="center"><img src="'+action[0]+'"><\/div>
      //newwindow.document.write('<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD XHTML 1.0Transitional\/\/EN" "http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd"><html xmlns="http:\/\/www.w3.org\/1999\/xhtml">');
      //newwindow.document.write('<head><title>Popup<\/title><\/head><body style="overflow:hidden;background-image:url('+action[0]+'); background-repeat: no-repeat;">');
      
      //newwindow.document.write('<head><title>Popup<\/title><\/head><body>');
      
      
      //newwindow.document.write('<p><div align="center"><img src="'+action[0]+'"><\/div>');
      
      //newwindow.document.write('<\/body><\/html>');
      
      
      //alert(write);
      newwindow.document.write(w);
   }

  newwindow.moveTo(positionleft,positiontop);
  
  newwindow.focus();
	
  return true;
}
