window.onload=init;

var moveup;
var movedown;
var Expand;
var Scroll;
var year;


function init() {

	copyright();

	Expand=document.getElementById("expanse");
	Scroll=document.getElementById("scroll");

	Expand.style.top=0+"px";
	
	reset();

}


function reset() {

	if (parseInt(Expand.offsetHeight, 10) >= 272)

		{
		Scroll.className="";
		}

	else

		{
		Scroll.className="inithidden";
		}
}


function scrolldown(time, speed) {

	Expand=document.getElementById("expanse");

	if (parseInt(Expand.style.top, 10) >= (-(parseInt(Expand.offsetHeight, 10))+252+speed)) {

		Expand.style.top=parseInt(Expand.style.top, 10)-speed+"px";
		movedown=setTimeout("scrolldown("+time+","+speed+")",time);
	
	}
}	


function scrollup(time, speed) {

	Expand=document.getElementById("expanse");

	if (parseInt(Expand.style.top, 10) <= 0-speed) {
		Expand.style.top=parseInt(Expand.style.top, 10)+speed+"px";
		moveup=setTimeout("scrollup("+time+","+speed+")",time);
	
	}	

}


function off(updown) {

	var arrow=document.getElementById(updown);

	arrow.src="../images/"+updown+"Arrow.gif";

}


function on(updown) {

	var arrow=document.getElementById(updown);

	arrow.src="../images/"+updown+"ArrowOver.gif";

}


function clik(updown) {

	var arrow=document.getElementById(updown);

	arrow.src="../images/"+updown+"ArrowClik.gif";

}


function blowup(image) {

	var blowup=document.getElementById("blowup")
	blowup.innerHTML="<a onclick='blowaway()'><img src='"+image+"' /></a>";
	blowup.style.zIndex="10";

}


function blowaway() {

	var blowup=document.getElementById("blowup")
	blowup.innerHTML="";
	blowup.style.zIndex="-1";
	
}


function mInsert() {

  	document.write("<a href='m&#97;ilto:info&#64;op&#101;nhydro&#46;com?subj&#101;ct=M&#97;il from W&#101;bsit&#101;'>info&#64;op&#101;nhydro&#46;com</a>");

}


function copyright() {

	var year = new Date().getFullYear();

	var Copy = document.getElementById("copyright");
	Copy.innerHTML = "&copy; OpenHydro Group Limited " + year + ". | Company Number 392378. | ";

}