// Brouser Check //
var Ver = navigator.appVersion.charAt(0);
var Ie = ( navigator.userAgent.indexOf("MSIE") != -1 );
var Mac = ( navigator.appVersion.indexOf("Mac") != -1 );

// Document Scroll

function ScrollToTop() {
	ScrollTo(0);
}

function ScrollToObj( id ) {
	var y = GetObjPosY(id);
	ScrollTo( y );
}

function ScrollTo( y ) {
	if( scrollTimer ) clearInterval( scrollTimer );
	scrollToY = y;
	scrollLastY = GetScrollPosY();
	scrollTimer = setInterval( 'ScrollDo();', 17 );
}



var scrollToY;
var scrollLastY;
var scrollTimer;

function ScrollDo() {
	var d = scrollLastY - scrollToY;
	var done = false;
	if( Math.abs(d)<1 ) {
		done = true;
		scrollLastY = scrollToY;
	} else if( GetScrollPosY() != Math.floor(scrollLastY) ) done = true;
	else scrollLastY -= d / 6;
	self.scrollTo( 0, Math.floor(scrollLastY) );
	if( done ) {
		clearInterval( scrollTimer );
		scrollTimer = null;
	}
}

function GetScrollPosY() {
	if( Ie ) return document.body.scrollTop;
	return self.pageYOffset;
}

function GetObjPosY( id ) {
	var o = vGetObj(id);
	if( document.getElementById ) return o.offsetTop;
	if( Ie ) return o.style.pixelTop;
	return o.top;
}

//---------------------------------------------------------
 function PageResizeXY()
{
  window.moveTo(0,0);
  resizeTo(screen.availWidth,screen.availHeight);
  if (document.layers||document.getElementById) {
   if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
    top.window.outerHeight = screen.availHeight;
    top.window.outerWidth = screen.availWidth;
   }
  }
}


 function PageBack(){ history.back(); }

 function javaC(myLink,closeme,closeonly)
  {
  if (! (window.focus && window.opener))return true;
  window.opener.focus();
  if (! closeonly)window.opener.location.href=myLink.href;
  if (closeme)window.close();
  return false;
 }

 function javaW1(myLink,windowName)
 {
  if(! window.focus)return;
  var myWin=window.open("",windowName,"height=490,width=240,dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,top=5,left=5");
  myWin.focus();
  myLink.target=windowName;
 }

 function javaW2(myLink,windowName)
 {
  if(! window.focus)return;
  var myWin=window.open("",windowName,"height=390,width=170,dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,top=5,left=5");
  myWin.focus();
  myLink.target=windowName;
 }

 function javaW3(myLink,windowName)
 {
  if(! window.focus)return;
  var myWin=window.open("",windowName,"height=340,width=170,dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,top=30,left=262");
  myWin.focus();
  myLink.target=windowName;
 }

 function javaW4(myLink,windowName)
 {
  if(! window.focus)return;
  var myWin=window.open("",windowName,"height=450,width=630,dependent=yes,menubar=no,location=yes,directories=no,toolbar=no,scrollbars=yes,status=yes,resizable=yes,top=5,left=5");
  myWin.focus();
  myLink.target=windowName;
 }

 function javaW45(myLink,windowName)
 {
  if(! window.focus)return;
  var myWin=window.open("",windowName,"height=450,width=630,dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,top=15,left=15");
  myWin.focus();
  myLink.target=windowName;
 }

 function javaW5(myLink,windowName)
 {
  if(! window.focus)return;
  var myWin=window.open("",windowName,"height=390,width=590,dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,top=20,left=20");
  myWin.focus();
  myLink.target=windowName;
 }

 function javaW6(myLink,windowName)
 {
 if(! window.focus)return;
 var myWin=window.open("",windowName,"height=350,width=350,dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,top=20,left=20");
 myWin.focus();
 myLink.target=windowName;
 }

 function javaW7(myLink,windowName)
 {
 if(! window.focus)return;
 var myWin=window.open("",windowName,"height=450,width=450,dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,top=20,left=20");
 myWin.focus();
 myLink.target=windowName;
 }

 function javaW8(myLink,windowName)
 {
 if(! window.focus)return;
 var myWin=window.open("",windowName,"height=400,width=680,dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,top=300,left=310");
 myWin.focus();
 myLink.target=windowName;
 }

 function javaWindow(myLink,windowName,Height,Width,Top,Left)
 {
 if(! window.focus)return;
 var myWin=window.open("",windowName,"height="+ Height +",width="+ Width +",dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,top="+ Top +",left="+ Left +"");
 myWin.focus();
 myLink.target=windowName;
 }


 function javaWindowA(selName,myLink,restore,windowName,Height,Width,Top,Left)
 {
 var selObj = MM_findObj(selName); if (restore) selObj.selectedIndex=0;
 n = selObj.selectedIndex;
 var href = selObj.options[n].value;
 if(! window.focus)return;
 var myWin=window.open(""+ href +"",windowName,"height="+ Height +",width="+ Width +",dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,top="+ Top +",left="+ Left +"");
 myWin.focus();
 myLink.target=windowName;
 }

 
 function javaWindowUrl(myLink,windowUrl,windowName,Height,Width,Top,Left)
 {
 if(! window.focus)return;
 var myWin=window.open(""+ windowUrl +"",windowName,"height="+ Height +",width="+ Width +",dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=no,resizable=yes,top="+ Top +",left="+ Left +"");
 myWin.focus();
 myLink.target=windowName;
 }

function javaWindowSSL(myLink,windowName,Height,Width,Top,Left)
 {
 if(! window.focus)return;
 var myWin=window.open("",windowName,"height="+ Height +",width="+ Width +",dependent=yes,menubar=no,location=no,directories=no,toolbar=no,scrollbars=yes,status=yes,resizable=yes,top="+ Top +",left="+ Left +"");
 myWin.focus();
 myLink.target=windowName;
 }

 function javaWindowSSL2(myLink,windowName,Height,Width,Top,Left)
 {
 if(! window.focus)return;
 var myWin=window.open("",windowName,"height="+ Height +",width="+ Width +",dependent=no,menubar=no,location=no,directories=no,toolbar=no,scrollbars=no,status=yes,resizable=no,top="+ Top +",left="+ Left +"");
 myWin.focus();
 myLink.target=windowName;
 }
