// -------------------- Flash -------------------- //

function drawSwf(url, w, h, c, m){
	var e_pm = '';
	document.write('<object width="' +w+ '" height="' +h+ '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8">');
	document.write('<param name="movie" value="' +url+ '" />');

	e_pm += drawPm("quality", "high");
	e_pm += drawPm("menu", "false");
	e_pm += drawPm("bgcolor", c);
	e_pm += drawPm("allowScriptAccess", "always");
	if(drawSwf.arguments.length > 4){ if(m != 0) e_pm += drawPm("wmode", "transparent"); }
	else e_pm += drawPm("wmode", "opaque");

	document.write('<embed width="' +w+ '" height="' +h+ '" src="' +url+ '" ' +e_pm+ 'pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash">');
	document.write('</embed>');
	document.write('</object>');
}

function drawPm(n, v){
	document.write('<param name="' +n+ '" value="' +v+ '" />');
	return (n + '="' + v + '" ');
}


// -------------------- MouseOver -------------------- //

function setAjm(){
	var obj = document.getElementsByTagName("img");
	ajm_i = new Array();
	for(var i=0; i<obj.length; i++){
		if(obj[i].className.indexOf("ajm") > -1){
			var obj_o = obj[i].src.slice(0, -4) +"_o"+ obj[i].src.slice(-4);
			ajm_i[i] = new Image(); ajm_i[i].src = obj_o;
			if(obj[i].className == "ajm_o") obj[i].src = obj_o;
			else {
				obj[i].onmouseover = function(){
					this.src = this.src.slice(0, -4) +"_o"+ this.src.slice(-4);
				}
				obj[i].onmouseout = function(){
					this.src = this.src.replace("_o.", ".");
				}
			}
		}
	}
}
if(window.addEventListener) window.addEventListener("load", setAjm, false);
else if(window.attachEvent) window.attachEvent("onload", setAjm);

