function goToPage(formname) {
    var newPage = formname.eventname.options[formname.eventname.selectedIndex].value
    if (newPage != "") {
        location.href=newPage
    }
}

function formValidator(){
	var tixvendor = document.theaterSearch.tixvendor;
	if(isEmpty(tixvendor, "Please select the site on which you'd like to search for tickets.")){					
		return false;
	}
}

function formValidator_inner(){
	var tixvendor = document.theaterSearch_inner.tixvendor;
	if(isEmpty(tixvendor, "Please select the site on which you'd like to search for tickets.")){					
		return false;
	}
}

function isEmpty(elem, helperMsg){
	if(elem.value.length == 0){
		alert(helperMsg);
		elem.focus();
		return true;
	}
	return false;
}

function clearDefault(el) {
	  if (el.defaultValue==el.value) el.value = ""
}

function featureVideoPlayer(path) {
	//Flash Video Player for Feature Pages	
	var flashvars = {};
									
	var params = {
		allowscriptaccess:"always",
		wmode:"transparent"
	};
	var attributes = {
		id: "videoPlayer",
		name: "videoPlayer"
	};
									
	swfobject.embedSWF("../media/swf/flvplayer/vidPlayer.swf", "flv_player", "629", "356", "8.0.0", "", flashvars, params, attributes);
}

//jQuery
		function expandWidget() {
			$("#ticketwidgetcontainer").css({ 
				height: "410px"
			  });
			$("#ticketwidget").css({ 
				height: "390px"
			  });

		}
		
		function contractWidget() {
			  $("#ticketwidgetcontainer").css({ 
				height: "250px"
			  });
			   $("#ticketwidget").css({ 
				height: "240px"
			  });
		}

$(document).ready(function(){


		$('.standard_register_pop').click(function(){
			if(!window.open($(this).attr('href'),'_blank','width=400,height=500'))
				alert('Please disable your popup blocker');

			return false;
		});
		
		$('.widget_pop').click(function(){
			if(!window.open($(this).attr('href'),'_blank','width=300,height=250'))
				alert('Please disable your popup blocker');

			return false;
		});
		
		
		/* MediaPanel Downloads */
		$(".selectsizelist").fadeTo(1000, 0.1);
		$(".selectsizelist").hover(
		  function () {
			$(this).fadeTo(500, 0.8);
			$(this).find('.padder').slideUp('slow');
		  }, 
		  function () {
			$(this).fadeTo(500, 0.1);
			$(this).find('.padder').slideDown('slow');
		  });
		

		/*$('#share a').click(function(){
			
			var rel = $(this).attr('rel');

			if(share){
				share.send(rel);
			}

			return false;
		});*/

	});
