
function floatFlash(src, width, height, swfPosition){
	
	
	var ie4 = (document.all);
	var ns4 = (document.layers);
	var ns6 = (!document.all && document.getElementById);
	
	if (ie4) {
	var horiCenter = document.body.clientWidth/2
	var vertCenter = document.body.clientHeight/2
	}
	else {
	var horiCenter = window.innerWidth/2
	var vertCenter = window.innerHeight/2
	}
	
	var horiPos = horiCenter - width/2
	var vertPos = vertCenter - height/2
	
	
	var setLocation = new Array();
		setLocation['TL'] = "top: 0; left: 0;";
		setLocation['TR'] = "top: 0; right: 0;";
		setLocation['BL'] = "bottom: 0; left: 0;";
		setLocation['BR'] = "bottom: 0; right: 0;";
		setLocation['C'] = "top: "+vertPos+"; left: "+horiPos+";"
	// Set center
	var center = true
	document.write ('<div style="position: absolute; ' + setLocation[swfPosition] +  '" z-index: 1;>');
	
	loadFlashObject(src, width, height, 0);
	document.write('</div>');
	
	
}

//scripted by W5 Internet - my Virtual Sales Person
//remove requirement for ie users to click on obj before using.

function loadFlashObject(src, width, height, loop){
	htmlStr = '<object name="' +src+ '" ';
	htmlStr += 'codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,16,0" ';
	htmlStr += 'width="' + width + '" height="' + height + '"';
	htmlStr += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param name="loop" value="0" />';
	htmlStr += '<param name="movie" value="' + src + '" /><param name="wmode" value="transparent" />';
	htmlStr += '<param name="quality" value="high" />';
	htmlStr += '<embed width="' + width + '" height="' + height + '" src="' + src + '" quality="high"wmode="transparent" ';
	htmlStr += 'pluginspage="https://www.macromedia.com/go/getflashplayer" wmode="transparent" type="application/x-shockwave-flash" ></embed></object>';
	document.write(htmlStr);
	
	var movieName = src;
	
	  if(navigator.appName.indexOf("Microsoft Internet")==-1){
		if(document.embeds && document.embeds[movieName]){
		 	 document.embeds[movieName].play(); 
		}
	  }
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

if (readCookie("RunFlash") == null)
{
	floatFlash('https://www.mvsp.net/bank2/mvsp2.swf', 350, 480, 'BL');
	createCookie("RunFlash","1",1)
}