﻿function EmbedSoapVideo(vars, height, width){
	document.write('<embed flashvars="'+vars+'" width="'+width+'" height="'+height+'" src="http://images.soapbox.msn.com/flash/soapbox1_1.swf" quality="high" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer">')
}

function EmbedSilverlightControl(p_src,p_host,p_id,p_width,p_height)
{
	var scene = new logos.Logos();
	Silverlight.createObjectEx({
		source: p_src,
		parentElement: document.getElementById(p_host),
		id: p_id,
		properties: {
			width: p_width,
			height: p_height,
			version: "1.0"
		},
		events: {
			onLoad: Silverlight.createDelegate(scene, scene.handleLoad)
		}
	});
}

// live search search
function DoLiveSearch(){
	var searchField=document.getElementById('searchterm');
	var searchval=searchField.value;
	if(searchval!=""){
		document.location.href="http://www.bing.com/search?q1=site%3Awww.healthsquare.be&FORM=FREESS&cp=1252&q="+escape(searchval);
	}else{
		searchField.focus();
	}
}

function SubmitSearchOnEnter(evt){
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode :
        ((evt.which) ? evt.which : evt.keyCode);
    if (charCode == 13 || charCode == 3){
    	document.forms[0].onsubmit=function(){return false;} // prevent default form submit on enter
    	DoLiveSearch();
    	return false;
    }
}

function TitleHover(TitleSpan)
{

}
