// ---------------------------------------------------------------
//
// Project: xyyyz_projname
// Date:    xyyyz_date
// Module:  javascript routines
// Version: 4.0
//
// sibenaler.mca / www.sibenaler.com
//
// Description: javascript frontend
//
// Copyright  : Use of this package is granted while operating
//				within the originally designed environment. Under
//				no condition can this software be sold, altered
//				or distributed without the clear permission of
//				sibenaler mca. Exposing system security to third
//				parties or using system information to exploit
//				similar systems is strictly prohibited.
//				Violation of any of the above will make the
//				operator of this software liable towards the
//				developers.
//
// ---------------------------------------------------------------




function UnCryptMailto( s ){
    var n = 0;
    var r = "";
    for( var i = 0; i < s.length; i++){
        n = s.charCodeAt( i )
        if( n >= 8364 ){ n = 128; }
        r += String.fromCharCode( n - 1 );
    }
    return r;
}

function linkTo_UnCryptMailto( s ){
    location.href=UnCryptMailto( s );
}



function setNavi(name){
	document.getElementById('m_' + name).src = 'img/menu/high/' + name + '.gif';
}

function unsetNavi(name){
	if (document.pageid == name){
		document.getElementById('m_'+ name).src = 'img/menu/high/' + name + '.gif';
	}else{
		document.getElementById('m_'+ name).src = 'img/menu/norm/' + name + '.gif';
	}
}

function initNavi(){
	if (document.pageid != ''){
		document.getElementById('m_' + document.pageid).src = 'img/menu/high/' + document.pageid + '.gif';;
	}
}


function preload (){
	plImagesNorm = new Array();
	plImagesHigh = new Array();
	for (i=0; i<plArr.length; i++){
		url = document.absPath + 'img/menu/norm/' + plArr[i] + '.gif';
		plImagesNorm[i] = new Image(url);
		url = document.absPath + 'img/menu/high/' + plArr[i] + '.gif';
		plImagesHigh[i] = new Image(url);
	}

}


function initnavi() {
	document.getElementById('mi_' + document.menu).src = document.absPath + 'img/menu/high/' + document.menu  + '.gif';
}

function setnavi(areaname) {
	document.getElementById('mi_' + areaname).src = document.absPath + 'img/menu/high/' + areaname  + '.gif';
}

function unsetnavi(areaname) {
	if (areaname != document.menu){
		document.getElementById('mi_' + areaname).src = document.absPath + 'img/menu/norm/' + areaname  + '.gif';
	}

}

 
