var win = null;
function newWindow(mypage,myname,w,h,features) {
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}

function openPicture2(imageName,imageWidth,imageHeight,alt,posLeft,posTop,desc) {
	alt=titles[alt];
	desc=descriptions[desc];
	alert(desc);
}

function openPicture(imageName,imageWidth,imageHeight,alt,posLeft,posTop,desc) {
	alt=titles[alt];
	desc=descriptions[desc];
	newWindow = window.open("","","width=600,height=600,scrollbars=1,resizable=1");
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#ffffff" leftmargin="20" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<center><table border="0" cellpadding="0" cellspacing="0">');
	newWindow.document.write('<tr><td align="center"><table width="90%"><tr><td style="font-family: arial,helvetica,sans-seric; font-size: 9pt">'+unescape(desc)+'</td></tr></table></td></tr>');
	newWindow.document.write('<tr><td>&nbsp;</td></tr><tr><td>');
	newWindow.document.write('<img src='+imageName+' width='+imageWidth+'  alt='+alt+'>'); 
	newWindow.document.write('</tr></td></table></center>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}


function newwin(url,w,h) {
	if (w>screen.width) {w=screen.width-10};
	if (h>screen.height) {h=screen.height};
    options="width="+w+",height="+h+",scrollbars=1,resizable=1";
	nw=window.open(url,'',options);
}


function newbrowser(url,w,h) {
	if (w>screen.width) {w=screen.width-10};
	if (h>screen.height) {h=screen.height};
    options="width="+w+",height="+h+",titlebar,location,directories,menubar,toolbar,scrollbars,resizable";
	nw=window.open(url,'',options);
}


function open_Demo_Window(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function clickthru(url,referrer,id) {
  result="http://www.adhub.com/cgi-bin/webdata_pro.pl?_cgifunction=clickthru"+
	     "&url="+escape(url)+"&referrer="+escape(referrer)+"&id="+id;
  return result;
}


function MM_openBrWindow(theURL,winName,features) { //v2.0 
  window.open(theURL,winName,features); 
} 


