var NN  = (document.layers ? true : false);
var NN6      = (document.getElementById&&!document.all ? true: false);
var hideName = (NN ? 'hide' : 'hidden');
var showName = (NN ? 'show' : 'visible');
var zIdx 	 = 10;
var loc=location.href;
//   loc
if ((loc.lastIndexOf("/")+1)==loc.length){loc="index.shtml";}
else {loc=loc.substring((loc.lastIndexOf("/")+1));}


/********************************************************************************
-
********************************************************************************/

function genLayer(sName, sLeft, sTop, sWdh, sHgt, sVis, copy, bgC, fcN, fcE, classE) {
func=fcN||"";
funcE=fcE||"";
bgCol=bgC||"";
classStr=classE||'';
	if (NN) 
		{
		document.writeln('<LAYER NAME="' + sName + '" LEFT=' + sLeft + ' TOP=' + sTop + 
		' WIDTH=' + sWdh + ' HEIGHT=' + sHgt + ' VISIBILITY="' + sVis + '" bgColor="'+ bgCol + '"' + 
		' z-Index="' + (++zIdx) + '" '+func+'>' + copy + '</LAYER>');
		}
	else 
		{
		document.writeln('<DIV ID="' + sName + '" STYLE="position:absolute; overflow:none; left:' + 
		sLeft + 'px; top:' + sTop + 'px; width:' + sWdh + '; height:' + sHgt + ';' + 
		' visibility:' + sVis + '; background:'+ bgCol +'; z-Index=' + (++zIdx) + '" '+classStr+' '+funcE+'>' + copy + '</DIV>');
		}

}

function retLayer(sName, sLeft, sTop, sWdh, sHgt, sVis, copy, bgC, fcN, fcE, classE) {

func=fcN||"";
funcE=fcE||"";
bgCol=bgC||'';
classStr=classE||'';
var output='';

	if (NN) 
		{
		output+='<LAYER NAME="' + sName + '" LEFT=' + sLeft + ' TOP=' + sTop + 
		' WIDTH=' + sWdh + ' HEIGHT=' + sHgt + ' VISIBILITY="' + sVis + '" bgColor="'+ bgCol + '"' + 
		' z-Index="' + (++zIdx) + '" '+func+'>' + copy + '</LAYER>';
		}
	else 
		{
		output+='<DIV ID="' + sName + '" STYLE="position:absolute; overflow:none; left:' + 
		sLeft + 'px; top:' + sTop + 'px; width:' + sWdh + 'px; height:' + sHgt + 'px;' + 
		' visibility:' + sVis + '; background:'+ bgCol +'; z-Index=' + (++zIdx) + '" '+classStr+' '+funcE+'>' + copy + '</DIV>';
		}

return output;
}

function hideSlide(name) {refSlide(name).visibility = hideName;}
function showSlide(name) {refSlide(name).visibility = showName;}

//     
function bgSlide(name, col) {
if (NN){refSlide(name).bgColor=col;}
else {refSlide(name).backgroundColor=col;}
}

function refSlide(name) {if (NN) { return document.layers[name]; }else if (NN6){return document.getElementById(name).style;}else { return eval('document.all.' + name + '.style'); }}
// 1k DHTML API
d=document;l=(d.layers)?1:0;op=navigator.userAgent.toLowerCase().indexOf('opera')!=-1;
function gE(e,f){if(l){f=(f)?f:self;var V=f.document.layers;if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(d.all)return d.all[e];return d.getElementById(e);}
function sE(e){if(l)e.visibility='show';else e.style.visibility='visible';}
function hE(e){if(l)e.visibility='hide';else e.style.visibility='hidden';}
function sZ(e,z){if(l)e.zIndex=z;else e.style.zIndex=z;}
function sX(e,x){if(l)e.left=x;else if(op)e.style.pixelLeft=x;else e.style.left=x;}
function sY(e,y){if(l)e.top=y;else if(op)e.style.pixelTop=y;else e.style.top=y;}
function sW(e,w){if(l)e.clip.width=w;else if(op)e.style.pixelWidth=w;else e.style.width=w;}
function sH(e,h){if(l)e.clip.height=h;else if(op)e.style.pixelHeight=h;else e.style.height=h;}
function sC(e,t,r,b,x){if(l){X=e.clip;X.top=t;X.right=r;X.bottom=b;X.left=x;}else e.style.clip='rect('+t+' '+r+' '+b+' '+x+')';}
function wH(e,h){if(l){Y=e.document;Y.write(h);Y.close();}if(e.innerHTML)e.innerHTML=h;}
function cE(i){if(l){d.layers[i]=new Layer(0);eval("document."+i+"=d.layers[i]");}else{if(typeof d.createElement!='undefined'){X="<div id='"+i+"' style=\"position:absolute\">&nbsp;</div>";Y=d.createElement("DIV");if(Y){Y.innerHTML=X;d.body.appendChild(Y);}else if(typeof d.body.insertAdjacentHTML!='undefined')d.body.insertAdjacentHTML("BeforeEnd",X);}}}


/********************************************************************************/
function writeH (e,h){
if (NN6){document.getElementById(e).innerHTML=h;}
else {eval(e).innerHTML=h;}
}

function getH (e){
if (NN6){h=document.getElementById(e).innerHTML;}
else {h=eval(e).innerHTML;}
return h;
}

function newsMenu(){

if (!title){alert ("  ");}

var sections=title.split(" | ");
var sub1=sections[0];

if (sections[1]!=""){var sub2=sections[1];}
if (sections[2]&&sections[2].indexOf('')==-1){var sub3=sections[2];}

//    
myBody=document.getElementById("lm");
myBodyElements=myBody.getElementsByTagName("p");

for (var i=0; i<myBodyElements.length; i++)
	{
	myP=myBodyElements.item(i);
	myA=myP.getElementsByTagName("a");
	var myText=myA.item(0).innerHTML;
	//myA.item(0).className="act";

	//   
		if (myText.indexOf(sub1)!=-1&&sections.length==2) 
		{
		myBodyElements.item(i).className="act";
		}
	
	if (sub3!="")
	{
		if (myText.indexOf(sub3)!=-1) 
		{
		myBodyElements.item(i).className="subact2";
		/*
		myA=myBodyElements.item(i).getElementsByTagName("a");
		myA.item(0).className="act";
		*/
		break;
		}
	
	}
	
	if (!sub3) 
	{
			
		if (sub2)
		{	
			if (myText.indexOf(sub2)!=-1) 
			{
			myBodyElements.item(i).className="subact";
			break;
			}
		
		}
	  	
	}

	
}


}


/*     */
function correctHdrs(){
if (document.all){
	var s=0;
	while (document.all[s])
		{	
		// class access
		if (document.all[s].className=="heading")
			{
			inh=document.all[s].innerHTML;
			len=inh.length;
			xCoef=9;
			wW=(len*xCoef);
			document.all[s].style.pixelWidth=wW;	
			}	
		s++;
		}
	}
}

function resize(){
window.moveTo(0,0);
window.resizeTo(798,730);
return;
}


function printVi(goimg){
var cont=getH('printcontent').toString()||'';
//var nsrc=getH('news_src').toString()||'';
var nsrc='';
var text = cont.replace(/\r\n/ig, "");
if (goimg!='yes') {text = text.replace(/<IMG[^<]+>/ig, "");}
//text = text.replace(/<FONT class=[^<]+>([^<]+)<\/FONT>/ig, "<B>$1</B>");
var printtext='&nbsp;&nbsp;<A HREF="javascript:window.print();"><IMG SRC="/i/print.gif" WIDTH="55" HEIGHT="15" BORDER=0 ALT=""></A><BR><BR>';
printtext+=text;

var pr = window.open("","printVersion","width=420,height=220,screenX=150,screenY=150,top=150,left=150,location=no, toolbar=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes");
pr.document.open();
pr.document.writeln('<HEAD><TITLE>  </TITLE>');
pr.document.writeln('<LINK REL="Stylesheet" href="/i/rs.css" type="text/css">');
pr.document.writeln('</HEAD>');
pr.document.writeln('<BODY>');
pr.document.writeln(printtext);
pr.document.writeln('<FONT style="font-family:Verdana; font-size:10px">' + nsrc + '</FONT>');
pr.document.writeln('</BODY>');
pr.document.close();
pr.focus();
}

