var track="http://www.aprppolynesie.com/media/test.mp3";

function changeit(){
	movedown(-50);
	createCookie("aprppolynesie.comaudio","OK",0);
}

function startit(){
	s=document.getElementById("div");
	if (readCookie("aprppolynesie.comaudio")!="OK"){
	s.innerHTML ='<object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 width=145 height=35 align=middle><param name=allowScriptAccess value=always><param name=movie value=http://www.aprppolynesie.com/media/player.swf><param name=flashvars value=playitem='+track+'><param name=quality value=high><param name=bgcolor value=#ffffff><embed src=http://www.aprppolynesie.com/media/player.swf quality=high bgcolor=#ffffff width=145 height=35 align=middle allowScriptAccess=always flashvars=playitem='+track+' type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer></object>'

	JSFX_FloatDiv('div', 10, -50).flt();
	}
	else {
	s.innerHTML ="";
	s.style.visibility = 'hidden';
	s.style.left="0px";
	s.style.top="0px";
	}
}
 
function movedown(p)
{   x=parseInt(p);
	x=x+7;
	if (x<-7)
		{JSFX_FloatDiv("div", 10, x).flt();
	    setTimeout("movedown(x)",1);
		}
	else
	{
	s=document.getElementById("div");
	s.innerHTML ="";
	s.style.visibility = 'hidden';
	}
}
/*
<!-- *********************************************************
     * You may use this code for free on any web page provided that 
     * these comment lines and the following credit remain in the code.
     * Floating Div from http://www.javascript-fx.com
     ********************************************************  -->*/

var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
var px = document.layers ? "" : "px";
function JSFX_FloatDiv(id, sx, sy)
{
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	window[id + "_obj"] = el;
	if(d.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};
	el.init=false;
	el.flt=function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
		if(!this.init)
		{
			this.init=true;
			this.cx = pX+this.sx;
			this.cy = pY+this.sy;
		}
		this.sP(this.cx, this.cy);
		setTimeout(this.id + "_obj.flt()", 40);
	}
	return el;
}

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);
}
