// popwin
function centerPopUp( url, name, width, height, scrollbars, toolbar ) {

	   if( scrollbars == null ) scrollbars = "0";
	   if( toolbar == null ) toolbar = "0";
       if( scrollbars == "1" ) width = width+17;
        
        
	   var str  = "";
	   str += "resizable=1,titlebar=0,menubar=0,toolbar=" + toolbar + ",location=0,directories=0,status=1,";
	   str += "scrollbars=" + scrollbars + ",";
	   str += "width=" + width + ",";
	   str += "height=" + height + ",";
	   if ( window.screen ) {
		  var ah = screen.availHeight - 30;
		  var aw = screen.availWidth - 10;

		  var xc = ( aw - width ) / 2;
		  var yc = ( ah - height ) / 2;

		  str += ",left=" + xc + ",screenX=" + xc;
		  str += ",func=" + yc + ",screenY=" + yc;
	   }
	   var ewin = window.open( url, name, str );
    	ewin.focus();
    }

// set styles in mainnav
function setClassName(objId, className) {
    document.getElementById(objId).className = className;
}


// language changer
function changelangto(to)   {
	var pathnow = window.document.location.href;
	var langcharpos = pathnow.indexOf("lang_");
	langcharpos = langcharpos+5;
	var langnow =  pathnow.substring(langcharpos,langcharpos+1);
	window.location.href = pathnow.substring(0,langcharpos)+to+pathnow.substring(langcharpos+1,pathnow.length);
}



