// JavaScript Document

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//
// JavaScript Document

function subwin(url){
	sbwin=
window.open(url,"subwinopen","width=900,height=600,location=0,resizable=1,scrollbars=1,menubar=0,status=1");
}
function on(){
	window.focus();
}


function subwin2(url){
	sbwin=
window.open(url,"subwinopen","width=900,height=600,location=0,resizable=1,scrollbars=1,menubar=0,status=1");
}
function on(){
	window.focus();
}

function subwin3(url){
window.open(url,"subwinopen","width=800,height=600,location=0,resizable=1,scrollbars=1,menubar=0,status=1");
window.focus();
}

function subwin4(url){
window.open(url,"subwinopen","width=1150,height=800,location=0,resizable=1,scrollbars=1,menubar=0,status=1");
}
window.focus();

function subwin5(url){
window.open(url,"subwinopen","width=450,height=130,location=0,resizable=0,scrollbars=0,menubar=0,status=1");
}
window.focus();

function subwin6(url){
	sbwin=
window.open(url,"subwinopen","width=1000,height=700,location=0,resizable=1,scrollbars=1,menubar=0,status=1");
}
function on(){
	window.focus();
}


//

<!-- Javascript
if (document.images) {

sub_1 = new Image();sub_1.src = '/en/img/dir_1.gif';
sub_2 = new Image();sub_2.src = '/en/img/dir_2.gif';
}
function di(id,name){
  if (document.images) {document.images[id].src=eval(name+".src"); }
}

// -->
//

function mk_setBlankItem(_element, _Str1, _Str2) {
if (!_Str2) _Str2 = "";
if (!!_element) {
if (_element.value == _Str1) _element.value = _Str2;
}
}
//

// JavaScript Document


var pageScrollTimer;
function pageScroll(toX,toY,frms,cuX,cuY) { // 020314
 if (pageScrollTimer) clearTimeout(pageScrollTimer);
 if (!toX || toX < 0) toX = 0;
 if (!toY || toY < 0) toY = 0;
 if (!cuX) cuX = 0 + getScrollLeft();
 if (!cuY) cuY = 0 + getScrollTop();
 if (!frms) frms = 10;

 cuX += (toX - getScrollLeft()) / frms; if (cuX < 0) cuX = 0;
 cuY += (toY - getScrollTop()) / frms;  if (cuY < 0) cuY = 0;
 var posX = Math.floor(cuX);
 var posY = Math.floor(cuY);
 window.scrollTo(posX, posY);
 if (posX != toX || posY != toY) {
  pageScrollTimer = setTimeout("pageScroll("+toX+","+toY+","+frms+","+cuX+","+cuY+")",16);
 }
}

function jumpToPageTop() { // 020301
 if (!MacIE3 && !MacIE4 && !NN && window.scrollTo || NN && (Vminor >= 4.75) && window.scrollTo) {
  pageScroll(0,0,5);
 } else {
  location.hash = "top";
 }
}

var Mac = navigator.appVersion.indexOf('Mac',0) != -1;
var Win = navigator.appVersion.indexOf('Win',0) != -1;
var IE  = navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1;
var NN  = navigator.appName.indexOf("Netscape",0) != -1;
var Moz = navigator.userAgent.indexOf("Gecko",0) != -1;
var Opera = window.opera;
var Vmajor = parseInt(navigator.appVersion); // ex. 3
var Vminor = parseFloat(navigator.appVersion); // ex. 3.01

var MacIE4 = ((Mac && navigator.appVersion.indexOf('MSIE 4.',0) != -1));
var MacIE3 = ((Mac && navigator.appVersion.indexOf('MSIE 3.',0) != -1));

// --------------------
// [window] scroll
// --------------------

function getScrollLeft() { // 020225
 if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
  return document.body.scrollLeft;
 } else if (window.pageXOffset) {
  return window.pageXOffset;
 } else {
  return 0;
 }
}

function getScrollTop() { // 020225
 if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
  return document.body.scrollTop;
 } else if (window.pageYOffset) {
  return window.pageYOffset;
 } else {
  return 0;
 }
}

function getScrollWidth() { // 010317
 if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
  return document.body.scrollWidth;
 } else if (window.innerWidth) {
  return window.innerWidth;
 }
 return 0;
}

function getScrollHeight() { // 010317
 if ((navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1)) {
  return document.body.scrollHeight;
 } else if (window.innerHeight) {
  return window.innerHeight;
 }
 return 0;
}

/*FOR HORIZONTAL BAR OF IE6 2010/06/11*/
window.onload = function() {
ScrollBar();
}
window.onresize=function(){
ScrollBar();
}
function getBrowserWidth() {
if ( window.innerWidth ) {
return window.innerWidth;
}
else if ( document.documentElement &&
document.documentElement.clientWidth != 0 )
{ return document.documentElement.clientWidth; }
else if ( document.body )
{ return document.body.clientWidth; }
return 0;
}
function moveWindowCenter() {
var x = getBrowserWidth() / 1;
window.scroll(0,0);
}
function ScrollBar(){
sbar = document.documentElement;
if (getBrowserWidth() >= 1095) {
sbar.style.overflowX ="hidden";
}
else {
sbar.style.overflowX ="auto";
}
}
