// JavaScript Document

// fonction anti-spam pour les mails
function Mail(nom,domaine)
{
	document.write('<a href=\"mailto:' + nom + '@' + domaine + '\">');
	document.write(nom + '@' + domaine + '</a>');
}

function Test()
{
   document.write('Test du test de test!');
}

// pour éviter le cadre autour des swf sur IE 6
/*function RunSwf(width,height,chemin)
{
   document.write('<object width="'+width+'" height="'+height+'" />');
   document.write('<param name="movie" value="'+chemin+'" />');
   document.write('<param name="quality" value="high" />');
   document.write('<param name="wmode" value="transparent" />');
   document.write('<embed src="'+chemin+'" type="application/x-shockwave-flash" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'" />');
   document.write('</object>');
}*/
function RunSwf(width,height,chemin)
{
	document.write('<object type="application/x-shockwave-flash" data="'+chemin+'" width="'+width+'" height="'+height+'" >');
	document.write('<param name="movie" value="'+chemin+' />');
	document.write('</object>');
}
				

// affiche une image dans une nouvelle page de la taille de l'image
function ImageMax(chemin){
	html = '<html><head><title>Ty Studio: Visuel</title></head><body onClick="top.close()" onBlur="top.close()"><IMG src="'+chemin+'" BORDER=0 NAME=ImageMax onLoad="window.resizeTo(document.ImageMax.width+50, document.ImageMax.height+100)"></body></html>';
	popupImage = window.open('','_blank','toolbar=0, location=0, directories=0, menuBar=0, scrollbars=1, resizable=1');
   	popupImage.document.open();
   	popupImage.document.write(html);
   	popupImage.document.close()
}

// affiche un menu au clic
function AffichageMenu(objAff)
{
	if (document.getElementById(objAff).style.display =='')
	{
		document.getElementById(objAff).style.display = 'none';
	}
	else
	{
		document.getElementById(objAff).style.display = '';
	}
}

function Flash_Transparent(swf, largeur, hauteur, couleur, nom, version, parametre) 
{
	document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+version+",0,0,0\" width=\""+largeur+"\" height=\""+hauteur+"\" id=\""+nom+"\" align=\"middle\">\n");
	document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />\n");
	document.write("<param name=\"menu\" value=\"false\" />\n");
	document.write("<param name=\"FlashVars\" value=\"clickTAG="+parametre+"\">\n");
	document.write("<PARAM NAME=wmode VALUE=transparent>\n");
	document.write("<param name=\"movie\" value=\""+swf+"\" /><param name=\"quality\" value=\"high\" /><param name=\"bgcolor\" value=\""+couleur+"\" /><embed src=\""+swf+"\" FlashVars=\"clickTAG="+parametre+"\" wmode=\"transparent\" quality=\"high\" bgcolor=\""+couleur+"\" width=\""+largeur+"\" height=\""+hauteur+"\" name=\""+nom+"\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\n");
	document.write("</object>\n");
}
