function search_within(last_search){
	document.search_form.keyword.value=last_search;
	document.search_form.keyword.focus();
}

function StopPlayer(){
	getFlashMovie("mymovie").stop_it();
	
}
function SetVariables(sound_id, track_title,sec_duration,lib_id,page,from,keyword){    
	getFlashMovie("mymovie").play_it(sound_id,track_title,sec_duration,lib_id,page,from,keyword);		   
}

function getFlashMovie(movieName) {
		  	var isIE = navigator.appName.indexOf("Microsoft") != -1;
		  	return (isIE) ? window[movieName] : document[movieName];
}

function showResponse(request){	
	hide_loader();
	var newData = request;		
		if(newData.indexOf('<ERROR>')>-1){		
			var y=newData.indexOf('<ERROR>');
			var z=newData.indexOf('</ERROR>');
			var length=z-(y+7);
			alert_id=newData.substr(y+7,length);		
			show_ghost(alert_id);			
			return false;
		}
		else
		{			
			//document.getElementById('loader').innerHTML=newData;
			document.paypal_register.submit();
			//window.location='registered.php';	
		}
		
}

function post_form(myForm){
	showLoad();
	var url='/ajax_include/register.php';	
	new Ajax(url,{postBody: $(myForm), evalScripts:true, onComplete: showResponse}).request();	
}

function showLoad () {
	document.getElementById('loader').style.display="block";
}

function show_ghost(text){
	Growl.Bezel({
	title: '',
	text: text,
	duration: 4
	});
	return false;
}


function hide_loader(){
	document.getElementById('loader').style.display="none";	
}