function getCode( url , type, width, height ){
	
	
	getWinCode( url, type, width, height);
	
	/*window.open('/codeInsert.php?url='+url+'&type='+type+'&width='+width+'&height='+height,'Insertion d\'un code HTML','menubar=no,status=no,scrollbar=no,resize=no,width=550,height=500');*/
	
}

function getWinCode(url, type, width, height){
	
	var r = '';
	r += '<textarea type="text" style="width:100%;font-family:Arial,Helvetica,sans-serif;font-size:12px;color:#000000;overflow:hidden;" rows="1" onclick="this.select()">';
	switch(type){
		case 'gif'	:	r += '<a href="http://www.salondugolf.fr" title="Le Salon du Golf" target="_blank">';
						r += '<img alt="Le Salon du Golf" src="'+url+'" border="0" width="'+width+'" height="'+height+'" />';
						r += '</a>';
						break;
						
		default		:	r += '<a href="http://www.salondugolf.fr" title="Le Salon du Golf" target="_blank">';
						r += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" name="Le Salon du Golf" align="middle" width="'+width+'" height="'+height+'">';
						r += '<param name="allowScriptAccess" value="always">';
						r += '<param name="movie" value="'+url+'">';
						r += '<param name="quality" value="best">';
						r += '<param name="bgcolor" value="#ffffff">';
						r += '<embed src="'+url+'" quality="best" bgcolor="#ffffff" name="Le Salon du Golf" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" width="'+width+'" height="'+height+'">';
						r += '</object>';
						r += '<br /><small>Le Salon du Golf</small></a>';
						break;
	}
	r += '</textarea>';
	document.write(r);
	
}

function winCodeShow(value){

	var code = document.getElementById('i_code');
	var prev = document.getElementById('i_preview');
	prev.innerHTML = value;
	prev.innerHTML += '<div align="right"><a href="javascript:void(0);" onclick="winCodeClose();"><img src="http://img.salondugolf.fr/images/icones/code_source.gif" border="0" alt="Retour au code"/></a></div>';
	prev.style.display = 'block';
	code.style.display = 'none';

}

function winCodeClose(){

	var code = document.getElementById('i_code');
	var prev = document.getElementById('i_preview');
	prev.innerHTML = '';
	prev.style.display = 'none';
	code.style.display = 'block';

}

/*
elem : @object
*/
function idesactivate( elem , img ){

	if(elem == null)
		return false;
	elem.attributes.onclick.value='';

	elem.attributes.onmouseover.value='';
	elem.attributes.onmouseout.value='';
	elem.src=img;

}
/*
elem : @id
*/
function activate( elem , onClick , Normal, Over ){
	
	elem = document.getElementById( elem );
	//alert(elem.attributes.onclick.value);
	elem.onclick = function(){ eval( onClick ); } ; //'this.src=\'<?php print MY_HTTP_TEMPLATES ?>default/bt_inscription_grey.gif\'; desactivate(this); xajax_send( xajax.getFormValues(\'register\') );';
	elem.onmouseover=function(){'this.src=\''+Over+'\'';}; //\'<?php print MY_HTTP_TEMPLATES ?>default/bt_inscription_over.gif\';';
	elem.onmouseout=function(){'this.src=\''+Normal+'\'';}; //\'<?php print MY_HTTP_TEMPLATES ?>default/bt_inscription.gif\';';
	elem.src=Normal;
	
}

function checkNews(){
	

	ch = document.getElementById('input-news');
	if(ch.checked == true) ch.checked='';
	else ch.checked = 'checked';

}

function focuStar(star_id,int){
	
	for(var i=0; i<=4; i++){
		if(i<=int)
			document.getElementById('star_'+star_id+'_'+i).src = 'http://icos.apconcept.net/small/star_over.png';
		else
			document.getElementById('star_'+star_id+'_'+i).src = 'http://icos.apconcept.net/small/star.png';
		
	}
	
}
function staReset(id){
	
	var int = document.getElementById('input_'+id).value;
	focuStar(id,int);
	
}
function starSet(id,int){
	document.getElementById('input_'+id).value = int;
	var layer = document.getElementById('desc_'+id);
	switch(int){
		case 0 : layer.innerHTML = '1/5'; break;
		case 1 : layer.innerHTML = '2/5'; break;
		case 2 : layer.innerHTML = '3/5'; break;
		case 3 : layer.innerHTML = '4/5'; break;
		case 4 : layer.innerHTML = '5/5'; break;
	}
	focuStar(id,int);
	xajax__sendNote(int);
}

function sendsmart(){
	display('smartsearchload');
	document.location='/fr/plan-media/q/'+document.getElementById('inputsmartsearch').value;
	return false;
}
function sendpartsmart(){
	display('smartsearchload');
	document.location='/fr/partenaires/q/'+document.getElementById('inputsmartsearch').value;
	return false;
}