// JavaScript Document

/*___description________________________________________________
 *| opens a new window
 *| 
 *| _____________________________________________________________ 
*/
////openwindow('win', 'eventProc.asp' , 0 , 0 , 600 , 400 , 0 , 0 , 0 , 0 , 0, '');
////openwindow('win', 'eventProc.asp?pkey=<%%>' , 0 , 0 , 600 , 400 , 0 , 0 , 0 , 0 , 0, 'Do you want to open the window');
function openwindow(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable, promptbox)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
	
	if ( promptbox == '' ) {
		//alert('message: '+promptbox);
		window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
	
	}else{
		if ( confirm(promptbox) ) {
				window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
		};	
	};
};


function preloadImages() { 
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}



