﻿function initForm() {  // attaches all the events to the form elements


    if($("expander")) {
        Event.observe ("expander", "mousedown", fade)
    }


	if($("tagRef") && browser.indexOf('safari1') == -1) {
		Event.observe ( $("tagRef"), "change", loadNews );
	}
}

function loadNews(){
    document.fmCase.submit();
}
function showLink(url,text,pos){
    var link = "<p><a class=\"greyLink newsVideo\" id=\"video"+pos+"\" href=\"javascript:void(0);\" onclick=\"loadFlashPlayerVideo('"+url+"','','true',2,512,288,'');\">"+text+"</a></p>";
    
    return link
}

function fade(){
	alert('yeah');
	new Effect.Fade('expander', {
	duration: 0.25,
	afterFinish: function(){ expand(); } 
	});
    return(false);
}
function expand(){
	new Effect.Morph('story', {
	style:'height:49em',	
	duration: 1.0				 
	});
}	
Event.observe( window, "load", function() { initForm(); } );
