// JavaScript Document
var popwrite = ''
var linktextinst = '';
function pop(popimage,caption,linkdest,linktext) {
linktextinst = '';
popwrite = '';
MM_showHideLayers('Popdiv','','show')
popwrite += '<div class="popwrap"><span class="content"><br/><p>click on the image to <a href="#" onCLick="popClose()"><b>close</b></a></p><br/><a href="#" onClick="popClose()"><img src="' + popimage + '" border="0" width="300" height="200"></a>'
if (caption) popwrite += '<br/><br/><p>' + caption + '</p><br/></span></div>'
if (linktext) linktextinst = linktext;
if (!linktext) linktextinst += 'More...';
if (linkdest) popwrite += '<div class="popwrap"><a style="color:#fff;" href="' + linkdest +'">' + linktextinst + '</a></div>';

MM_setTextOfLayer('Popdiv','',popwrite)
flvFSL1('Popdiv',0,-80,2,0,0);
}
function popClose() {
MM_setTextOfLayer('Popdiv','','')
MM_showHideLayers('Popdiv','','hide')
flvFSL1('Popdiv',0,-700,4,0,0);
}
function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}
function jssi() {
MM_setTextOfLayer('Slider','', sliderjssi);
MM_setTextOfLayer('Footerdiv','', footerjssi);
}
function capt(captiontext) {
MM_setTextOfLayer('Captiondiv','', captiontext);	
}
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 Lvl_targetIframe(f,i,u){ //v1.0 4LevelWebs
 var b=(!f)?i:f+".frames['"+i+"']",o=(eval("opener&&opener.parent."+b))?"opener.":'';
 var el=eval(o+"parent."+b);el.location=u;document.MM_returnValue=false;
}
var iF_timer=null;
function stopScroll(){
clearTimeout(iF_timer);
}
function Lvl_iFrameScroller(f,i,t,d,a){ //v1.0 4LevelWebs
  var r="frames['"+i+"']",ie=document.all,y,c=(f&&!i)?f:(f&&i)?r:i;
 var b=(!f)?r:f+"."+r,o=(eval("opener&&opener.parent."+b))?"opener.":'';
 var v=(f&&i)?y=o+"parent."+f+"."+c:y=o+"parent."+r;
  var e=(a==1)?'scrollLeft':'scrollTop',n =(a==1)?'pageXOffset':'pageYOffset';
   var x=(a==1)?'p,0':(a==2)?'10000,0':(a==3)?'0,10000':'0,p',s=(d==0)?(ie)?t:t+.9:(ie)?-t:-(t-.9);
    var p=(document.all)?eval(y+".document.body."+e+"")+s:eval(y+"."+n+"")+s;
     var m =eval(y+".window.scrollTo("+x+")");
  iF_timer=setTimeout("Lvl_iFrameScroller('"+f+"','"+i+"',"+t+","+d+","+a+")",1)
}
function Lvl_iFramePage(f,i,d){ //v1.0 4LevelWebs
  var r="frames['"+i+"']",ie=document.all,y,c=(f&&!i)?f:(f&&i)?r:i;
 var b=(!f)?r:f+"."+r,o=(eval("opener&&opener.parent."+b))?"opener.":'';
 var v=(f&&i)?y=o+"parent."+f+"."+c:y=o+"parent."+r;
     var m =eval(y+".window.scrollBy(0,d)");
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function top(){
 MM_goToURL('parent.frames[\'mainFrame\']','#TOP');return document.MM_returnValue;
 }

function goi(gohere){
Lvl_targetIframe('','iframe1',gohere);return document.MM_returnValue;
}

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 flvFSL1(){//v2.3
// Copyright 2002-2004, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)
var v1=arguments,v2=v1[0],v3=MM_findObj(v2),v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20=window,v21=navigator;if (v3){v4=parseInt(v1[1]);v5=parseInt(v1[2]);v6=parseInt(v1[3]);v7=(v1.length>4)?parseInt(v1[4]):0;v8=(v1.length>5)?parseInt(v1[5]):0;v9=10;v10=document.layers?v3:v3.style;if (v3.SL1!=null){clearTimeout(v3.SL1);}v11=isNaN(parseInt(v10.left))?v3.offsetLeft:parseInt(v10.left);v12=isNaN(parseInt(v10.top))?v3.offsetTop:parseInt(v10.top);if (v8!=0){if (v8==1){v4=v11-v4;v5=v12;}else if (v8==2){v4=v11+v4;v5=v12;}else if (v8==3){v5=v12-v5;v4=v11;}else {v5=v12+v5;v4=v11;}}v13=v4;v14=v5;if ((v11!=v4)||(v12!=v5)){if (v7>0){v9=v6;v15=v7;v16=v7,v17=Math.abs(v11-v4),v18=Math.abs(v12-v5);if (v17<v18){v16=(v17!=0)?((v18/v17)*v7):v7;}else {v15=(v18!=0)?((v17/v18)*v7):v7;}if (v15>=v17){v15=Math.min(Math.ceil(v15),v7);}if (v16>=v18){v16=Math.min(Math.ceil(v16),v7);}if ((v11<v4)&&(v11+v15<v4)){v4=v11+v15;}if ((v11>v4)&&(v11-v15>v4)){v4=v11-v15;}if ((v12<v5)&&(v12+v16<v5)){v5=v12+v16;}if ((v12>v5)&&(v12-v16>v5)){v5=v12-v16;}}else {v17=((v4-v11)/v6);v18=((v5-v12)/v6);v17=(v17>0)?Math.ceil(v17):Math.floor(v17);v4=v11+v17;v18=(v18>0)?Math.ceil(v18):Math.floor(v18);v5=v12+v18;}v19=((parseInt(v21.appVersion)>4||v21.userAgent.indexOf("MSIE")>-1)&&(!v20.opera))?"px":"";if (v17!=0){v10.left=v4+v19;}if (v18!=0){v10.top=v5+v19;}var v22="flvFSL1('"+v2+"',"+v13+","+v14+","+v6+","+v7+",0)";v3.SL1=setTimeout(v22,v9);}else {if (v20.onSlideEnd){onSlideEnd(v2);}}}}
MM_reloadPage(true);

function getLeft(tD){
tT = MM_findObj(tD);
tS=document.layers?tT:tT.style;
if (tT.SL1!=null){clearTimeout(tT.SL1);}
tL=isNaN(parseInt(tS.left))?tT.offsetLeft:parseInt(tS.left);
return[tL];
}
//-->

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

/********************************************************************************** 
ScrollText 
*   Copyright (C) 2001 <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a> 
*   This script was released at DHTMLCentral.com 
*   Visit for more great scripts! 
*   This may be used and changed freely as long as this msg is intact! 
*   We will also appreciate any links you could give us. 
*
*   Made by <a href="/dhtmlcentral/thomas_brattli.asp">Thomas Brattli</a> 
*********************************************************************************/ 

function lib_bwcheck(){ //Browsercheck (needed) 
this.ver=navigator.appVersion 
this.agent=navigator.userAgent 
this.dom=document.getElementById?1:0 
this.opera5=this.agent.indexOf("Opera 5")>-1 
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0; 
this.ie4=(document.all && !this.dom && !this.opera5)?1:0; 
this.ie=this.ie4||this.ie5||this.ie6 
this.mac=this.agent.indexOf("Mac")>-1 
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
this.ns4=(document.layers && !this.dom)?1:0; 
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5) 
return this 
}
var bw=new lib_bwcheck() 


/***************** 

You set the width and height of the divs inside the style tag, you only have to 
change the divScrollTextCont, Remember to set the clip the same as the width and height. 
You can remove the divUp and divDown layers if you want. 
This script should also work if you make the divScrollTextCont position:relative. 
Then you should be able to place this inside a table or something. Just remember 
that Netscape crash very easily with relative positioned divs and tables. 

Updated with a fix for error if moving over layer before pageload. 

****************/ 


//If you want it to move faster you can set this lower, it's the timeout: 
var speed = 30 

//Sets variables to keep track of what's happening 
var loop, timer 

//Object constructor 
function makeObj(obj,nest){ 
nest=(!nest) ? "":'document.'+nest+'.' 
this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
this.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth 
this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth 
this.up=goUp;this.down=goDown; 
this.moveIt=moveIt; this.x=0; this.y=0; 
this.obj = obj + "Object" 
eval(this.obj + "=this") 
return this 
}

// A unit of measure that will be added when setting the position of a layer. 
var px = bw.ns4||window.opera?"":"px"; 

function moveIt(x,y){ 
this.x = x 
this.y = y 
this.css.left = this.x+px 
this.css.top = this.y+px 
}

//Makes the object go up (left) 
function goDown(move){ 
if (this.x>-this.scrollWidth+oCont.clipWidth){ 
this.moveIt(this.x-move,0) 
if (loop) setTimeout(this.obj+".down("+move+")",speed) 
}
}
//Makes the object go down (right)
function goUp(move){ 
if (this.x<0){ 
this.moveIt(this.x-move,0) 
if (loop) setTimeout(this.obj+".up("+move+")",speed) 
}
}

//Calls the scrolling functions. Also checks whether the page is loaded or not. 
function scroll(speed){ 
if (scrolltextLoaded){ 
loop = true; 
if (speed>0) oScroll.down(speed) 
else oScroll.up(speed) 
}
}

//Stops the scrolling (called on mouseout) 
function noScroll(){ 
loop = false 
if (timer) clearTimeout(timer) 
}
//Makes the object 
var scrolltextLoaded = false 
function scrolltextInit(){ 
oCont = new makeObj('Sliderholder') 
oScroll = new makeObj('Slider','Sliderholder') 
oScroll.moveIt(0,0)  
scrolltextLoaded = 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_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}
function flash(){
MM_changeProp('iframeframe','','style.borderColor','471B67','SPAN');
}
function unflash(){
MM_changeProp('iframeframe','','style.borderColor','291940','SPAN');
}