function BrowserCheck() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.min = (this.ns||this.ie)
}
is = new BrowserCheck()

if (navigator.appVersion.indexOf("2.") != -1){
	check = false;
	}
if ((navigator.appVersion.indexOf("3.") != -1) && (navigator.appName.indexOf("Explorer") != -1)){
	check = false;
	}
else {
	check = true;
	}


imageStay = ""
imageStay_img = ""



function imageon(name,img_name) {
	if (imageStay != name){
		if ((screen.colorDepth >= 24) && (is.ie4))
		{
			eval('document.images.'+name+'.src = "' + img_name + '";');
		}

		else
		{
			eval('document.images.'+name + '.filters.blendTrans.stop();');
			eval('document.images.'+name + '.filters.blendTrans.Apply();');
			eval('document.images.'+name + '.src = "' + img_name + '";');
			eval('document.images.'+name + '.filters.blendTrans.Play();');
		}
	}
}


function imageoff(name,img_name){
	if (imageStay != name){

			eval('document.images.'+name+'.src = "' + img_name + '";');
	}
}


function on(name,img_name){
	if (check == true){
		imageon(name,img_name);
	}
}


function off(name,img_name){
	if (check == true){
		imageoff(name,img_name);
	}
}


function stay(name,img_name,back_img){
	if (check == true){

		eval('document.images.'+name+'.src = "' + img_name + '";');

	if (imageStay != name){
		if (imageStay != ""){
			eval('document.images.'+imageStay+'.src = "' + imageStay_img + '";');
		}
	}

	imageStay = name		
	imageStay_img = back_img	
	}
}

function ImgView(obj,mode,key)
{

	if(mode == "out")
	{
		obj.src = ParseNm(obj.src,key,'out');
	}
	else if(mode == "over")
	{
		obj.src = ParseNm(obj.src,key,'over');

	}

	

}

function ParseNm(nm,sKey,sMode)
{
	p_dot = nm.lastIndexOf(".");
	af_nm = nm.substring(p_dot+1,nm.length);


	if(sMode == "out")
	{
		p_temp = nm.lastIndexOf(sKey+'.');
		bf_nm = nm.substring(0,p_temp);
		return bf_nm+'.'+af_nm;

	}
	else if(sMode == "over")
	{

		bf_nm = nm.substring(0,p_dot);
		return bf_nm+sKey+'.'+af_nm;
	}
	

}



function GrpMenu(grpObj)
{
	for(var i=0; i < document.all.GRP.length;i++)
	{
		if(document.all.GRP[i] == grpObj)
		{
			if(document.all.GRP[i].style.display == "")
			{
				document.all.GRP[i].style.display = 'none';
			}
			else
			{
				document.all.GRP[i].style.display = '';
			}
		}
		else
		{
			document.all.GRP[i].style.display = 'none';
		}
	}
}



function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function MM_openBrWindow2(theURL,winName,features) {
  window.open(theURL,winName,'status=no,width=300,height=200');
}


function openMovie(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function mp(src)
{
	document.all.mm.src="blank.asp?m_url="+src;
}


var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");

function CheckUIElements()
{
        var yMenu1From, yMenu1To, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

        if ( bNetscape4plus ) {

                yMenu1From   = document["Menu1"].top;
                yMenu1To     = top.pageYOffset + 10; 
        }
        else if ( bExplorer4plus ) { 

                yMenu1From   = parseInt (Menu1.style.top, 10);
                yMenu1To     = document.body.scrollTop + 180;
        }

        timeoutNextCheck = 500;

        if ( Math.abs (yButtonFrom - (yMenu1To + 152)) < 6 && yButtonTo < yButtonFrom ) {
                setTimeout ("CheckUIElements()", timeoutNextCheck);
                return;
        }


        if ( yButtonFrom != yButtonTo ) {
                yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
                if ( yButtonTo < yButtonFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divLinkButton"].top += yOffset;
                else if ( bExplorer4plus )
                        divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

        if ( yMenu1From != yMenu1To ) {
                yOffset = Math.ceil( Math.abs( yMenu1To - yMenu1From ) / 20 );
                if ( yMenu1To < yMenu1From )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["Menu1"].top += yOffset;
                else if ( bExplorer4plus )
                        Menu1.style.top = parseInt (Menu1.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

        setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function MovePosition()
{
        var y;


        if ( bNetscape4plus ) {
                document["Menu1"].top = top.pageYOffset + 150;
                document["Menu1"].visibility = "visible";

        }
        else if ( bExplorer4plus ) {
                Menu1.style.top = document.body.scrollTop + 150
                Menu1.style.visibility = "visible";

        }

        CheckUIElements();

        return true;
}

  function SelfTest() {
		LaunchCenter("/webModule/SelfTest/TestMain.asp", 'SelfTest','489', '800');						
  }
  
		function LaunchCenter(url, name, height, width) {

			var win_height = height;
			var win_width = width;
			var win_top = window.screen.height/2 - win_height/2;
			var win_left = window.screen.width/2 - win_width/2;
			var wintype="width=" +win_width+ ",height="+win_height+", top="+win_top+",left="+win_left+", menubar=no, scrollbars=yes, resizable=no, status=no, toolbar=no";

			return window.open(url, name, wintype);
		} 	  