function toggleInput(objElement) {
  if (objElement.className=='input-normal')
    objElement.className='input-focus';
  else
    objElement.className='input-normal';
}

function toggleInputSearch(objElement) {
  if (objElement.className=='quick-search-normal')
    objElement.className='quick-search-focus';
  else
    objElement.className='quick-search-normal';
}


function toggleTxtarea(objElement) {
  if (objElement.className=='txtarea-normal')
    objElement.className='txtarea-focus';
  else
    objElement.className='txtarea-normal';
}

function toggleImg(imgSrc, imgName, status) {
    var path = 'Client/Interface/' + imgSrc;
    
    if (status == 'on'){
      document[imgName].src = path + '_mover.gif';
    } else if (status == 'off'){
      document[imgName].src = path + '_idle.gif';
    } else if (status == 'active'){
       // Do nothing
    }
     
}

function CheckPoll() {

	poll_choice = false;
	
  	for (counter = 0; counter < document.poll_form.poll_content_id.length; counter++) {
  		if (document.poll_form.poll_content_id[counter].checked) {
			poll_choice = true; 
		}
  	}
  	
  	if(poll_choice) {
  		document.poll_form.submit();
  	} else {
  		alert("Please make a choice");
  	}
  	
}

function AboutCookies() {
  var left = screen.width/4;
	var top = screen.height/4;
	window.open("Popup.asp?view=AboutCookies","AboutCookies","left="+left+",top="+top+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=640,height=480");
}

function SwitchFrontPage (what,i) {
    if(what == "content") {
        document.frontpage.content_id[i].options[0].selected = true; 
    }
    if(what == "movie") {
        document.frontpage.movie_id[i].options[0].selected = true;    
    }
}

function TipFriend(movie_id) {
  var left = screen.width/4;
	var top = screen.height/4;
	window.open("Popup.asp?view=TipFriend&movie_id="+ movie_id,"TipFriend","left="+left+",top="+top+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=640,height=480");
}

function ReziseWindow() {
	window.resizeTo(360,document.body.clientHeight+60);
}

function addRate(rate) {
	document.vote_form.vote.value='';	
	document.vote_form.vote.value=rate;
	document.vote_form.submit();
}

function Rate(movie_id) {
  	var left = screen.width/4;
	var top = screen.height/4;
	window.open("Popup.asp?view=Rate&movie_id="+ movie_id,"Rate","left="+left+",top="+top+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=350,height=230");
}

function AboutCookies() {
  var left = screen.width/4;
	var top = screen.height/4;
	window.open("Popup.asp?view=AboutCookies","AboutCookies","left="+left+",top="+top+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=350,height=340");
}

function Poll(poll_id) {
  var left = screen.width/4;
	var top = screen.height/4;
	window.open("Popup.asp?view=Poll&poll_id="+ poll_id,"Poll","left="+left+",top="+top+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=640,height=480");
}

function LaunchScreen(movie_id) {
  var left = screen.width/4;
	var top = screen.height/4;
	window.open("Popup.asp?view=Screen&movie_id="+ movie_id,"SilverScreen","left="+left+",top="+top+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=640,height=480");
}
