function Randomize( min, max ) 
{
    if( min > max ) 
	{
        return( -1 );
    }
    if( min == max ) 
	{
        return( min );
    }
 
    return( min + parseInt( Math.random() * ( max-min+1 ) ));
} 
function resize()
{
	if (browser == "ie")
	{
		show2.style.top=show1.offsetTop+1;
		show2.style.left=show1.offsetLeft+1;
	}
	else
	{
		show2.style.top=show1.offsetTop;
		show2.style.left=show1.offsetLeft;
	}
}
function ch_wbanner()
{
	img_src=document.getElementById("wbpic");
	img_src.src="/upload/siteimages/headimages/"+iImg+".jpg";
	setTimeout("ch_wbanner(img_src)", 6000);
	iImg++;
	if (iImg>15)
		iImg=1;
}
iImg=Randomize(1,15);

if (navigator.appName.indexOf("Explorer") != -1)
{
    browser="ie";
}
else
{
    browser="other";
}


function changeDIV()
{
	  var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    myWidth = window.innerWidth;
	    myHeight = window.innerHeight - 25;
	  } else if( document.documentElement &&
	      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    myWidth = document.documentElement.clientWidth;
	    myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    myWidth = document.body.clientWidth;
	    myHeight = document.body.clientHeight;
	  }
    myHeight=eval(myHeight)-133;
    myWidth=eval(myWidth)-310;
	//alert(myHeight);
	//alert(myWidth);
	o_DIV=document.getElementById("scrolldiv");
	//o_DIV.style.height=myHeight + "px";
	o_DIV.style.width=myWidth + "px";
}

function moveleft()
{
	s=document.getElementById("scrolldiv");
	s.scrollLeft=s.scrollLeft-10
	//alert(parseInt(s_DIV.scrollLeft));
	movedownvar=setTimeout("moveleft()",50)
}
function moveright()
{
	s=document.getElementById("scrolldiv");
	s.scrollLeft=s.scrollLeft+2
	//s_DIV.style.left=parseInt(s_DIV.style.left)+10
	moveupvar=setTimeout("moveright()",10)
}
function stopscroll()
{
	if (window.moveupvar) 
		clearTimeout(moveupvar)
	if (window.movedownvar) 
		clearTimeout(movedownvar)
}

