/*****************************************************************************************************
	Flight of Phrase v1.0
	--> by Rocco Tripaldi
	
	http://www.gagear.web/software/flight-of-phrase/
	
	Flight of Phrase is released under the Creative Commons 2.5 Generic Attribution License
	http://creativecommons.org/licenses/by/2.5/
	
	Flight of Phrase would not be possible without the mouse coordinate detection from The JavaScript Source
	--> http://javascriptsource.com
	
	Please keep this section intact when using or modifying this script.
*****************************************************************************************************/
var configure = [];


// set up your custom configuration
// example: configure[4] = ['font', 'font color', 'glow color', 'animation type'];
// see http://www.gagearweb.com/software/flight-of-phrase/  for more information
// configure[0] is reserved for default configuration

configure[1] = ['comicSans', 'DEB05A', '5A412A', 'originBurst'];



// Only experienced programers should modify code below this line 

// capturing x and y
var x = 0; var y = 0;
var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE)
	document.onmousemove = getMouseXY;

function getMouseXY(e) {
if (IE) { // grab the x-y pos.s if browser is IE
x = event.clientX;
y = event.clientY;
}
else {  // grab the x-y pos.s if browser is NS
x = e.clientX;
y = e.clientY;
}  
if (x < 0){x = 0;}
if (y < 0){y= 0;}  
return true;
}



configure[0] = ['trebuchet', 'FFFFFF', '000000', 'perspectiveRandom'];
function flightOfPhrase() {
	var phrase = (arguments[0]) ? arguments[0] : "Flight Of Phrase";
	var ci = (arguments[1]) ? arguments[1] : 0;
	
	var p = document.getElementById("flightOfPhrase");
	if (!p) {
		var d = document.createElement("div");
		d.setAttribute("id", "flightOfPhrase");
		document.body.appendChild(d);
	}
	// create SWF
	var att = { data: "http://www.gagearweb.com/flash/"+configure[ci][0]+".swf", width:"100%", height:"100%" };
	var par = { wmode:"transparent", FlashVars:"phrase="+phrase+"&userX="+x.toString()+"&userY="+y.toString()+"&userColor="+configure[ci][1]+"&userGlow="+configure[ci][2]+"&animationType="+configure[ci][3] };
	var id = "flightOfPhrase";
	swfobject.createSWF(att, par, id);
	MM_showHideLayers('flightOfPhrase','','show');
	var t = setTimeout( "clearPhrase()", 5000);
}


function clearPhrase() {
	swfobject.removeSWF('flightOfPhrase');
	MM_showHideLayers('flightOfPhrase', '', 'hide');
}


// Macro Media Script Packaged with Dreamweaver CS3
<!--
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
