// Message Scroll Script in Browswer Status Bar	
// This script is used for controlling the browser status message for all pages
	var scrollCounter = 0;                      
	var scrollText    = "Welcome to EMEND ... the Heat Recovery Formula Sports Drink!!";
	var scrollDelay   = 50;                      
	var i = 0;                      
	while (i ++ < 140)                          
	scrollText = " " + scrollText;
	function Scroller()                      
	{window.status = scrollText.substring(scrollCounter++,scrollText.length);
	if (scrollCounter == scrollText.length)                                
	scrollCounter = 0;
	setTimeout("Scroller()", scrollDelay);}
	Scroller();
	// End of scroller script -->


//------------------------------------------------------------------------------------


// Gradual-Highlight image script- By Dynamic Drive
// For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
// This credit MUST stay intact for use
// This script is currently not used.



// <img src="man.gif" style="filter:alpha(opacity=30);-moz-opacity:0.3" onMouseover="high(this)" onMouseout="low(this)">

function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}

function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

//------------------------------------------------------------------------------------

/*
Shake image script (onMouseover)- © Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

// This script is used for the quick links section icons

/*  Add the following to style section in header or in css
<style>
	.shakeimage{
	position:relative
	}
</style>
*/

// <img src="man.gif" style="position:relative;" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this);top.focus()" onClick="top.focus()">

//configure shake degree (where larger # equals greater shake)
var rector=3

///////DONE EDITTING///////////
var stopit=0 
var a=1

function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}

function rattleimage(){
if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a==1){
shake.style.top=parseInt(shake.style.top)+rector
}
else if (a==2){
shake.style.left=parseInt(shake.style.left)+rector
}
else if (a==3){
shake.style.top=parseInt(shake.style.top)-rector
}
else{
shake.style.left=parseInt(shake.style.left)-rector
}
if (a<4)
a++
else
a=1
setTimeout("rattleimage()",50)
}

function stoprattle(which){
stopit=1
which.style.left=0
which.style.top=0
}

//------------------------------------------------------------------------------------

// Message Scroller

var id, pause=0, position=0;

function scrollMessage() {
        // variables declaration
        var i, k, msg="EMEND Heat Recovery Formula Sports Drink.           ";

        // increase msg
        k= (300/msg.length)+1;
        for (i=0; i<k; i++) msg+="  "+msg;

        //show it to window
        document.scroll2form.slide.value=msg.substring(position,position+100);

        //set new position
        if(position++==100) position=0;

        // repeat at entered speed
        id=setTimeout("scrollMessage()", 200) ;   
	}

