var previousImg = '';
var currentItem;
var player = null;

function playerReady(thePlayer) {
	player = window.document[thePlayer.id];
}

function hideMusicPlayer() {
	document.getElementById('contactIFrameId').style.display='none';
	document.getElementById('singerIFrameId').style.display='none';
	document.getElementById('theIFrameId').style.display='inline';
}

function hideVideoPlayer() {
	document.getElementById('contactIFrameId').style.display='none';
	document.getElementById('theIFrameId').style.display='none';
	document.getElementById('singerIFrameId').style.display='inline';
}

function showContact() {
	document.getElementById('contactIFrameId').style.display='inline';
}

function hideContact() {
	document.getElementById('contactIFrameId').style.display='none';
}

function changeImage(img, img_name, img_src) {
	document.menu1.src = 'images/artist_button_retract.gif';
	document.menu2.src = 'images/singer_button_retract.gif';
	document.menu3.src = 'images/actress_button_retract.gif';
	document.menu4.src = 'images/designer_button_retract.gif';
	document.menu5.src = 'images/contact_button_retract.gif';
	
	document[img_name].src = img_src;
	previousImg = img.src;
}

function changeImage2(img, img_name, new_image, previous) {
	if(previous) {
		previousImg = img.src;
		document[img_name].src = new_image;
	} else {
		document[img_name].src = previousImg;
	}
}
/*
function sendEvent(typ,prm) {
	thisMovie("playerID").sendEvent(typ,prm);
};

function loadFile(fil,tit,lnk,img,fid) {
	thisMovie("playerID").loadFile(fil,tit,lnk,img,fid);
};

function getUpdate(typ,pr1,pr2,pid) {
	if(typ == "item") { currentItem = pr1; setTimeout("getItemData(currentItem)",100); }
};

function getItemData(idx) { 
	self.parent.showUpdate("item: "+idx);
};

// This is a javascript handler for the player and is always needed.
function thisMovie(movieName) {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}
*/
function createPlayer(thePlace, theFile, width, height, theImage, playlist, playlistsize, theLogo, plugin, go) {
	var s = new SWFObject("player.swf", "playerID", width, height, "7");
	
	s.useExpressInstall('expressInstall.swf');
	
	s.addParam("allowfullscreen","true");
	s.addParam("allowscriptaccess","always");
	s.addParam("wmode", "transparent");
	
	s.addVariable("enablejs","true");
	s.addVariable("javascriptid","playerID");
	s.addVariable("file",theFile);
	s.addVariable("width",width);
	s.addVariable("height",height);
	s.addVariable("displayheight",height);
	s.addVariable("overstretch","fit");
	s.addVariable("image",theImage);
	s.addVariable("showicons","false");
	s.addVariable("thumbsinplaylist","false");
	s.addVariable("showstop","true");
	s.addVariable("showdownload","true");
	s.addVariable("searchbar","false");
	s.addVariable("autoscroll","true");
	s.addVariable("bufferlength","10");
	s.addVariable("shuffle","false");
	s.addVariable("volume","100");
	s.addVariable("backcolor","000000");
	s.addVariable("frontcolor","F7F7F7");
	s.addVariable("lightcolor","999999");
	s.addVariable("showeq","true");
	s.addVariable("skin", "simple.swf");
	
	s.addVariable('plugins', 'googlytics-1');

	if(plugin) {
		s.addVariable("plugins","revolt");
		s.addVariable("link","Revolt.swf");
	}
	
	//if (theLogo) { s.addVariable("logo", theLogo); }
	
	if (playlist) { s.addVariable("playlist","bottom"); s.addVariable("playlistsize", playlistsize); }
	
	if (go) { s.addVariable("autostart","true"); }
	
	s.write(thePlace);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
