function newsletters_image(){
    var s = document.signup_form.nl_email.value;
    if(s!=""){
        document.signup_form.nl_email.style.backgroundImage="none";
        document.signup_form.nl_email.style.backgroundColor="#FFFFFF";
    }else{
        document.signup_form.nl_email.style.background="url(http://www.toptenreviews.com/i/new_temp/enter_email.gif) no-repeat scroll left center";
        document.signup_form.nl_email.style.backgroundColor="#FFFFFF";
    }
}
function bottom_newsletter_image(){
    var e = document.newsletters_box.nl_email.value;
    if(e!=""){
        document.newsletters_box.nl_email.style.backgroundImage="none";
        document.newsletters_box.nl_email.style.backgroundColor="#FFFFFF";
    }else{
        document.newsletters_box.nl_email.style.background="url(http://www.toptenreviews.com/i/new_temp/enter_email.gif) no-repeat scroll left center";
        document.newsletters_box.nl_email.style.backgroundColor="#FFFFFF";
    }
}
function newsletterer_image(it){
    document.getElementById(it).style.backgroundImage="none";
}


function top_search_image(){
    var s = document.top_google_search.q.value;
    if(s!=""){
        document.top_google_search.q.style.backgroundImage="none";
        document.top_google_search.q.style.backgroundColor="#FFFFFF";
    }else{
        document.top_google_search.q.style.background="url(http://www.toptenreviews.com/i/new_temp/search-top-ten.gif) no-repeat scroll left center";
        document.top_google_search.q.style.backgroundColor="#FFFFFF";
    }
}
function searching_image(it){
    document.getElementById(it).style.backgroundImage="none";
}


function left_navigation_new(first, second, third, fourth){
    document.getElementById(first).style.display="none";
    document.getElementById(second).style.display="none";
    document.getElementById(third).style.display="block";
    document.getElementById(fourth).style.display="block";
}
function left_navigation_newer(first, second){
    document.getElementById(first).style.display="none";
    document.getElementById(second).style.display="block";
}
function istEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
    return true;
    else
    return false;
}
function newsletters_signup_value_check(){
    var e = document.newsletters_box.nl_email.value;
    if(e==''){
        return false;
    }else{
        if(istEmail(e)){
            return true;    
        }else{
            return false;   
        }
    }
}
function validaterChecker(){
    var allow = true;
    var message = "";
    if(!newsletters_signup_value_check()){
      allow = false;
      message += "Please Enter Your Email Address.\n";
    }
    if(allow){
      document.newsletters_box.submit();
    }else{
      alert(message);
      return false;
    }
}
function change_highlighted_bg(it){
    document.getElementById(it).style.backgroundImage="url(http://www.toptenreviews.com/i/new_temp/little-tabs.gif)";
}
function change_back_highlight(it){
    document.getElementById(it).style.backgroundImage="none";
}



function moveSlider(elementId)
{
	
	//this.totalMoves=totalMoves;
	//this.moves=0;
	var slider=document.getElementById(elementId);
	var sl2=document.getElementById('video_slider_hidden');
	this.jumpSize=25;
	var ua = navigator.userAgent;
	var isIE6=false;
	 if(ua.indexOf("MSIE 6.0")>=0)
	{
	 isIE6 = true;
	}
	this.move=function(upDown)
	{
		if(upDown==1 && parseInt(slider.style.top)<136)
		{
			var total=0;
			if(slider.style.top==-1)
			{
				var total=slider.style.top+this.jumpSize;
			}
			else
			{
				var total=parseFloat(slider.style.top)+this.jumpSize;
			}
			if(total>136)
			{
				total=136;	
			}
			var total2=parseFloat(total*-3.5);
			if(isIE6==true)
			{
			total2=total2-19;
			}
			sl2.style.top=total2+'px';
			slider.style.top=total+'px';
			
			
		}
		else if(upDown==-1 && parseInt(slider.style.top) > -1)
		{
		var total=parseFloat(slider.style.top)-this.jumpSize;
		if(total<-1)
		{
		total=-1;	
		}
		var total2=parseFloat(total*-3.5);
		if(isIE6==true)
		{
		total2=total2-19;
		}
		sl2.style.top=total2+'px';
		slider.style.top=total+'px';
		
		}
	}
	
}

var sliderJump= new moveSlider('sliderbar');
