//speak to Alex M if you need further explanation on this...



var flashvars = false;

var params = {

  bgcolor: "transparent",

  wmode: "transparent",

  quality: "high",

  salign: "t",

  menu: "false"

}

var attributes = false;



function writeFlash() {


	var url = location.href;
	if (url.indexOf("emperors") != -1) {
		swfobject.embedSWF("/peermont/applications/peermont/sections/emperors/templates/flash/banner.swf", "emperor_flash", "1000", "172", "9.0.28.0", "expressInstall.swf", flashvars, params, attributes);
	} else if (url.indexOf("graceland") != -1) {
		swfobject.embedSWF("/peermont/applications/peermont/sections/graceland/templates/flash/banner.swf", "emperor_flash", "1000", "172", "9.0.28.0", "expressInstall.swf", flashvars, params, attributes);
	} else if (url.indexOf("rio") != -1) {
		swfobject.embedSWF("/peermont/applications/peermont/sections/rio/templates/flash/banner.swf", "emperor_flash", "1000", "172", "9.0.28.0", "expressInstall.swf", flashvars, params, attributes);
	} else if (url.indexOf("mmabatho") != -1) {
		swfobject.embedSWF("/peermont/applications/peermont/sections/mmabatho/templates/flash/banner.swf", "emperor_flash", "1000", "172", "9.0.28.0", "expressInstall.swf", flashvars, params, attributes);
	} else if (url.indexOf("umfolozi") != -1) {
		swfobject.embedSWF("/peermont/applications/peermont/sections/umfolozi/templates/flash/banner.swf", "emperor_flash", "1000", "172", "9.0.28.0", "expressInstall.swf", flashvars, params, attributes);
	} else if (url.indexOf("khoroni") != -1) {
		swfobject.embedSWF("/peermont/applications/peermont/sections/khoroni/templates/flash/banner.swf", "emperor_flash", "1000", "172", "9.0.28.0", "expressInstall.swf", flashvars, params, attributes);
		} else if (url.indexOf("frontier") != -1) {
		swfobject.embedSWF("/peermont/applications/peermont/sections/frontier/templates/flash/banner.swf", "emperor_flash", "1000", "172", "9.0.28.0", "expressInstall.swf", flashvars, params, attributes);
		} else if (url.indexOf("grand") != -1) {
		swfobject.embedSWF("/peermont/applications/peermont/sections/grand/templates/flash/banner.swf", "emperor_flash", "1000", "172", "9.0.28.0", "expressInstall.swf", flashvars, params, attributes);
	}
}