function Custum_Button(Classe,Img_MouseOut,Img_MouseOver,Img_onPress){	
	var Buttons			=	getElementsByClassName(Classe, "*", document)	
	this.Img_MouseOver 	=	Img_MouseOver;
	this.Img_MouseOut 	=	Img_MouseOut
	this.Img_onPress 	=	Img_onPress
	for(var i=0; i<Buttons.length ; i++){
		this.monButton		=	Buttons[i];
		this.init(this.monButton,this.Img_MouseOver);
	}
}
Custum_Button.prototype={
	init : function(MonBouton,Img){
		var imgButton			=	document.createElement("img")
		imgButton.Img_MouseOut	=	this.Img_MouseOut;
		imgButton.Img_MouseOver	=	this.Img_MouseOver;
		imgButton.Img_onPress	=	this.Img_onPress;	
		imgButton.setAttribute("alt",MonBouton.value)
		imgButton.setAttribute("src",imgButton.Img_MouseOut)  
		var Parent	=	MonBouton.parentNode		
		Parent.insertBefore(imgButton,MonBouton)
		MonBouton.style.display = "none"			
		addEvent(imgButton, "mouseover", this.set_onMouseOver,false)	
		addEvent(imgButton, "mouseout", this.set_onMouseOut,false)	
		if(MonBouton.getAttribute("type")=="submit"){
			while(MonBouton.parentNode.getAttribute("action")==null){
				MonBouton=MonBouton.parentNode
			}
			formTOsubmit=MonBouton.parentNode	
			imgButton.formTOsubmit=	formTOsubmit	
			addEvent(imgButton, "mousedown", this.set_onSubmit,false)
		}else
		if(MonBouton.getAttribute("type")=="button"){	
			imgButton.onclick	=	MonBouton.onclick	
			addEvent(imgButton, "mousedown", this.set_onClick,false)
		}
	},
	set_onMouseOut : function(){
		var theCaller=((this.style)?this:event.srcElement);
		theCaller.setAttribute("src",theCaller.Img_MouseOut)

	} ,
	set_onMouseOver : function(){	
		var theCaller=((this.style)?this:event.srcElement);
		theCaller.setAttribute("src",theCaller.Img_MouseOver)
	} ,
	set_onClick : function(){
		var theCaller=((this.style)?this:event.srcElement);
		theCaller.setAttribute("src",theCaller.Img_onPress)
				
	} ,
	set_onSubmit : function(){	
		var theCaller=((this.style)?this:event.srcElement);		
		theCaller.setAttribute("src",theCaller.Img_onPress)				
		this.formTOsubmit.submit();
	}
}
function configInit(){		
	var MC_Button	=	new Custum_Button("custumButton","images/bouton_sinscrire.png","images/bouton_sinscrire_over.png","images/bouton_sinscrire.png");	
}
addLoadEvent(configInit);

function showPlayer(trackId) {
    window.open ("http://anode.nfrance.com/~k1373/mouskouri/content/player.php?vmid="+trackId, "Player","menubar=0,resizable=0,status=0, location=0,width=340,height=160");
}
function showVideoPlayer(videoTitle, clipId) {
    window.open ("http://anode.nfrance.com/~k1373/mouskouri/content/videoplayer.php?idclip="+ clipId+"&title="+videoTitle, "VideoPlayer","menubar=0,resizable=0,status=0, location=0,width=500,height=380");
}



