	var dom = document.getElementById?1:0;
	var ie4 = document.all && document.all.item;
	var opera = window.opera;
	var ie5 = dom && ie4 && !opera;
	timerID = 0;
	function getLayer(layerName){
	  if(dom) return document.getElementById(layerName);
	  if(ie4 || ie5) return document.all[layerName];
	}
	function block_hide(){clearTimeout(timerID);}
	function hide_olvic(name){timerID = setTimeout("hideObject(\'" + name + "\')", 100);}
	function hide_all(){
	  for(i=1; 1; i++){
	    hide_all_sub('Nav'+i);
	    obj = getLayer('Nav'+i);
		
		
	      if(null != obj){obj.style.display='none';}
		  else{break;}
	  }
	}
	function hide_all_sub(prefix){
	  for(i1=1; 1; i1++){
	    obj1 = getLayer(prefix+i1);
		//alert(prefix+i);
	      if(null != obj1){obj1.style.display='none'; }
		  else{break;}
	  }
	}
	function showObject(x) {
	  hide_all();
	  clearTimeout(timerID);
	  obj=getLayer(x);
	  obj.style.display='block';		
	}
	function showSubObject(x,prefix) {
	  hide_all_sub(prefix);
	  clearTimeout(timerID);
	  obj=getLayer(x);
	  obj.style.display='block';		
	}
	function hideObject(x) {
	  hide_all_sub(x);
	  obj=getLayer(x);
	  obj.style.display='none';
	}
	function showimg(u,wd,hg)
	{
	    s = window.open('','Pic','toolbar=no,location=no,directoties=no,status=no,scrollbars=no,menubar=no,resizable=yes,top=50,left=120,width='+(wd+16)+',height='+(hg+16));
	    s.document.open();
	    s.document.writeln('<html><head><title>photo</title></head><body bgcolor=ffffff onload="window.self.focus();return true;" leftMargin="0" topMargin="0" marginheight=0 marginwidth=0><table cellcpacing=0 cellpadding=5 border=0 width=100% height=100%><tr><td align=center><a href=javascript:window.close()><img src=' + u + ' border=0 width=' + wd + ' height="' + hg + '" alt="close"></a></td></tr></table></body></html>');
	    s.document.close();
	    s.focus();
	}
	
nn4 = (document.layers) ? true : false;
ie4 = (document.all) ? true : false;
dom = (document.createTextNode)? true : false;

function popupWindow(fileUrl, winW, winH, winN, scrollB) {
	var winWidth = (winW)? winW : 740;
	var winHeight = (winH)? winH : 520;
	var winName = (winN)? winN : 'popupWin'
	var scrollBars = (scrollB)? scrollB : 'auto'
	if (nn4 || ie4 || dom) {
		if (screen.width < winWidth + 50) { winWidth = screen.width - 50; scrollbars = 'yes' }
		if (screen.height < winHeight + 100) { winHeight = screen.height - 100; scrollbars = 'yes' }
		posX = Math.round((screen.width - winWidth) / 2);
		posY = Math.round((screen.height - winHeight) / 2);
		posCode = (nn4 || dom)? "screenX="+posX+",screenY="+posY : "left="+posX+",top="+posY;
	} else {
		posCode = "";
	}
	var popupWin = window.open(fileUrl, winName,"menubar=no,toolbar=no,scrollbars=" + scrollBars + ",status=yes,resizable=yes,width=" + winWidth + ",height=" + winHeight + "," + posCode);
	if (popupWin) popupWin.focus();
}
 
function newImage(arg) {
        if (document.images) {
                rslt = new Image();
                rslt.src = arg;
                return rslt;
        }
}

function putflash (url,width,height)
{

	var ax = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='../fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0/#version=7,0,0,0/default.htm' width='"+width+"' height='"+height+"' align='middle'>";
	ax += "<param name='allowScriptAccess' value='sameDomain' />";
	ax += "<param name='movie' value='"+url+"' />";
    ax += "<param name='menu' value='false' />";
    ax += "<param name='quality' value='high' />";
    ax += "<param name='wmode' value='transparent' />";
    ax += "<param name='bgcolor' value='#ffffff' />";
    ax += "<embed width='"+width+"' height='"+height+"' src='"+url+"' menu='false' quality='high' bgcolor='#ffffff' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='../www.macromedia.com/go/getflashplayer' />";
    ax += "</object>";
	document.write( ax );
}

