var conTent=0;
var weWant=0;
//If you want it to move faster you can set this lower:
var speed=40;
//Sets variables to keep track of what's happening
var loop, timer
//Calls the scrolling functions. Also checks whether the page is loaded or not.
function scroll(weWant,speed){
	if(loaded){
oCont=eval("oCont"+weWant);
oText=eval("oText"+weWant);
conTent=eval("(-oText"+weWant+".h+oCont"+weWant+".cb)");
//alert(-oText.h+oCont.cb)

		loop=true;
		if(speed>0) oText.down(speed)
		else oText.up(speed)
	}
}
//Stops the scrolling (called on mouseout)
function noScroll(){
	loop=false;
	clearTimeout(timer);
	weWant=0;
}


function get_random(totalNo)
{
	if (Math.random && Math.round)
	{
	var randNum= Math.round(Math.random()*(totalNo-1));
	randNum+=1;
	return randNum;
	}else{
	today= new Date();
	hours= today.getHours();
	mins=   today.getMinutes();
	secn=  today.getSeconds();
	if (hours==19)
	hours=18;
	var randNum= (((hours+1)*(mins+1)*secn)%totalNo)+1;
	return randNum;
	}
}


function randomImage()
{
	if (document.images){
	var selectedImg= get_random(4);  
	selectedImg--;

	var imageNo= new Array(4) 

	
	imageNo[0]="img/homepage_img_1.jpg";  
	imageNo[1]="img/homepage_img_2.jpg";  
	imageNo[2]="img/homepage_img_3.jpg";  
	imageNo[3]="img/homepage_img_4.jpg";  
	//imageNo[4]="img/homepage_img_5.jpg";  

			var r=document.getElementById('contentHomepageImage');
			r.style.backgroundRepeat="no-repeat";
			r.style.backgroundImage="url('" + imageNo[selectedImg] + "')";

 }
}

 function Submit()
 {
   document.myform.submit();
 }