// JavaScript Document

jQuery().ready(function(){


		// STOP IE6 Flicker
		if ($.browser.msie && $.browser.version.substr(0,1)<7) { 
			document.execCommand('BackgroundImageCache', false, true);
		};


		jQuery('#list1a').accordion({
			active: false, 
   			 header: '.head', 
    		navigation: true, 
			autoheight: false,
			event: 'click'
		
		});
		
	
		$('ul#portfolio').innerfade({
			speed: 2000,
			timeout: 5000,
			type: 'random',
			containerheight: '285px'
		});

})

// Vote
function HideVote() {
document.getElementById('VoteHold').style.display = "block";
document.getElementById('ResultHold').style.display = "none";
}

function ShowVote() {
document.getElementById('VoteHold').style.display = "none";
document.getElementById('ResultHold').style.display = "block";
}

function ValidateSurvey(form) 
{
	var msg = "Please select a survey option!\n";

	for (i = form.SurveyOption.length-1; i > -1; i=i-1) {
		if (form.SurveyOption[i].checked)
			msg = "";
	}

	if (msg == "")
		return true;
	else {
		alert(msg);
		return false;
	}
}
	
	
//    CLEAR INPUT FUNCTIONS    //
	function clearcodeEmail()
	{
	if (document.SubscribeForm.EmailString.value == "Email..." )
		document.SubscribeForm.EmailString.value = "";

	}
	
	function codeEmail()
	{
	if (document.SubscribeForm.EmailString.value == "" )
		document.SubscribeForm.EmailString.value = "Email...";

	}

	function clearcodeName()
	{
	if (document.SubscribeForm.NameString.value == "Name..." )
		document.SubscribeForm.NameString.value = "";

	}
	
	function codeName()
	{
	if (document.SubscribeForm.NameString.value == "" )
		document.SubscribeForm.NameString.value = "Name...";

	}
	
	function clearSearch()
	{
	if (document.SearchForm.SearchString.value == "Enter Keywords..." )
		document.SearchForm.SearchString.value = "";

	}

	function checkSearch()
	{
	if (document.SearchForm.SearchString.value == "" )
		document.SearchForm.SearchString.value = "Enter Keywords...";

	}
	
	function focusIt() {
	
		var mytext = document.getElementById("FocusEmail");
		mytext.focus();	
		
	};



