// JavaScript Document
function popUp(hr,size,h,n) {
if (!n) { n='carla'; }
	var sfx=new Array('.jpg','.JPG','.gif','.GIF','.png','.PNG');
	var sfxfound=-1;
	for (i=0;i<sfx.length;i++) {
		sfxfound=hr.indexOf(sfx[i]);
		if (sfxfound!=-1) { i=sfx.length; }
	}
	sb='yes';
	if ((sfxfound!=-1)&&(!size)) {
	sb='auto';
		w=1;
		h=1;
	} else if (h) {
		w=size;
		if (n=='noscroll') { sb='no'; }
	} else {
		if (n=='noscroll') { sb='no'; }
		w=400;
		h=500;
		if ((size=="s")||(size=="i")) { w=500;h=200; }
		if (size=="l") { w=700;h=500; }
		if (size=="fs") {
    	    if (screen.availHeight) {
    		  	h = screen.availHeight;
    		  	w = screen.availWidth;
			} else if (screen.height) {
    	  		h = screen.height - 10;
    	  		w = screen.width;
			}
		}
	}	
	if (size!="i") {
		carla=window.open('',n,'left=0,screenX=0,top=0,screenY=0,resizable,scrollbars='+sb+',width='+w+',height='+h+'');
		if (sfxfound!=-1) {
			carla.document.open("text/html", "replace");
			var markup='<html>';
			if (!size) { markup+='<head><script language="javascript">function res() { w=document.images[0].width+30; h=document.images[0].height+30; if (w>screen.availWidth){w=screen.availWidth;} if(h>screen.availHeight){h=screen.availHeight;} window.resizeTo(w,h);}</script></head>' }
			markup+='<body bgcolor="#ffffff"><table cellspacing=0 cellpadding=0 border=0 width=100% height=100%><tr><td align="center" valign="middle"><a href="javascript:window.close()" onClick="window.close()"><img src="'+hr+'"';
			if (!size) { markup+='onLoad="res()"' }
			markup+=' border="0"></a></td></tr></table></body></html>';
			carla.document.write(markup);
			carla.document.close();
		} else { carla.location=hr; }
		cw=carla.outerWidth;
		ch=carla.outerHeight;
		if ((cw!=w)&&(ch!=h)) { carla.resizeTo(w,h) }
		carla.focus();
	return false;
	}
}

function targetOpener(mylink,closeme) {
if (!window.opener) {return true;}
window.opener.location.href=mylink;
if (closeme) {window.close();}
return false;
}