// JScript File
function toggleEffect(button, field){
    if ($(field).style.display=='none'){
        new Effect.BlindDown(field);
    }else{
        new Effect.BlindUp(field);
    }
}

function evPostBack(vartype, varvalue){
    $('extravar').value = vartype;
    $('extravarvalue').value = varvalue;
    $('aspnetForm').submit();
}

function showEmailFormWithLink(link){
    $('ctl00_headerph_Header1_EmailFriendWidget1_linkurltxt').innerHTML = link;
    $('ctl00_headerph_Header1_EmailFriendWidget1_linkurlfield').value = link;
    
    new Effect.Appear('sendtofriend');
}

function showEmailForm(){
    new Effect.Appear('sendtofriend');
}
function showEmailFormError(){
    
    new Element.show('sendtofriend');
}
function showEmailFormThenClose(){
    new Element.show('sendtofriend');
    setTimeout("new Effect.Fade('sendtofriend');",3000);
}
function closeEmailForm(){
    new Effect.Fade('sendtofriend');
}

function printpage(divname){
    
    var printwindow = window.open("print.htm?div=" + divname );

}

function showText (id,whichText,count) 
{
	if (document.getElementById)
	{ 
		//curIndex = parseInt(id.substring(6));
		//document.getElementById('placeholder'+set).src = whichpic.href;
		for (i = 1; i < count+1; i++) {
			if ($('s'+i)!=null){
			    $('s'+i).style.display = 'none'; 
			    $('l'+i).className = '';
		    }
		}
		
		$('s'+id).style.display = 'block';
		$(whichText).className = 'selected';
		
		return false; 
	}
	else 
	{ 
		return true; 
	} 
}

function showTextHM(id,count) 
{
	if (document.getElementById)
	{ 
		//curIndex = parseInt(id.substring(6));
		//document.getElementById('placeholder'+set).src = whichpic.href;
		for (i = 1; i < count+1; i++) {
			if ($('s'+i)!=null){
			    $('s'+i).style.display = 'none'; 
			    $('l'+i).className = '';
		    }
		}
		
		$('s'+id).style.display = 'block';
		$('l'+id).className = 'selected';
		
		return false; 
	}
	else 
	{ 
		return true; 
	} 
}


function showFaq (id,count) 
{
	
		for (i = 1; i < count+1; i++) {
			$('s'+i).style.display = 'none'; 
		}
		
		$('s'+id).style.display = 'block';
		
		return false; 
	
}

function popupClassDesc(content,link, pop){
    var box = $('classdesctip');
    if (pop){
        box.innerHTML = content;
        box.style.top = Position.cumulativeOffset(link)[1]+12;
	    box.style.left = Position.cumulativeOffset(link)[0];
	    Element.show(box);
    }else{
        Element.hide(box);
    }
}


function changeloc(dropdown){
    var value = dropdown[dropdown.selectedIndex].value;
    var url = window.location.href.split('?')[0];
    if (value=="LA"){
        window.location = url + "?nloc=LA";
    }else if(value=="NY"){
        window.location = url + "?nloc=NY";
    }else if (value=="OC"){
        window.location = url + "?nloc=OC";
    }else if (value=="SF"){
        window.location = url + "?nloc=SF";
    }
}

function trainerlist(){
        if ($('trainerdiv').style.display==""){
            new Effect.BlindUp('trainerdiv');
        }else{
            new Effect.BlindDown('trainerdiv');
        }
    
    }