
var _embed = new _Embed();

function _Embed(){
	var $url = location.href;
	var $host = location.host;
	var $path = $url.split($host)[1];
	$path = $path.replace(/^\/?(.*)\/?$/, "$1");
	var $directory = $path.split("/")[0];
	var $activeMenu = "";
	switch($directory) {
		case "productinfo" : $activeMenu = "product";   break;
		case "companyinfo" : $activeMenu = "company";   break;
		case "customers"   : $activeMenu = "customers"; break;
		case "contact"     : $activeMenu = "contact";   break;
		case ""            : $activeMenu = "index";     break;
	}
	var vars = {
		activeMenu: $activeMenu
	}
	var params = {
		wmode: "transparent"
	}
	var headAttributes = {
		id: "head-wave-swf",
		name : "head-wave-swf"
	}
	var footAttributes = {
		id: "foot-wave-swf",
		name : "foot-wave-swf"
	}
	swfobject.embedSWF("/shared/swf/head.swf?v3", "head-wave", "100%", "130", "9.0.0", false, vars, params, headAttributes);
	swfobject.embedSWF("/shared/swf/foot.swf?v3", "foot-wave", "100%", "120", "9.0.0", false, null, params, footAttributes);

	if(!isIE) {
	var timer = setInterval(function(){
		var headSwf = document.getElementById("head-wave-swf");
		var footSwf = document.getElementById("foot-wave-swf");
		if(headSwf && footSwf) {
		  new SWFForceSize(headSwf, 1000, 130);
		  new SWFForceSize(footSwf, 1000, 120);
		  clearInterval(timer);
		}
	}, 50);
	}
	
}