/*
* @desc fourni un raccourci pour document.getElementById
* @param string id de l'élément 
* @return DOMElement 
*/
function pg_$() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string') {element = document.getElementById(element);}
		if (arguments.length == 1) {	return element;	}
		elements[elements.length] = element;
	}return elements;
}
/** */
function pg_get_cookie_val(offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}
/*
* @desc retourne une référence à la méthode d'un objet 
* @param object
* @param string nom de la méthode 
* @return function 
*/
function pg_get_method( o_, fct_) {
	return( function(){o_[ fct_]()});
}
/*
* @desc renvoie la valeur d'un cookie 
* @param string cookie name
* @return mixed 
*/
function pg_get_cookie(name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg) {	return pg_get_cookie_val(j);}
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) {	break;	}
	}
	return 0;
}


/*
* @desc défini l'opacité d'un élément 
* @param DOMElement e element
* @param int o opacity
* @return void 
*/
function pg_opacity(e, o) {
	pg_$(e).style.opacity = o;
	pg_$(e).style.MozOpacity = o;
	pg_$(e).style.KhtmlOpacity = o;
	pg_$(e).style.filter = "alpha(opacity=" + (o * 100) + ")";
}

/*
* @desc fixe la valeur d'un cookie 
* @param string cookie name 
* @param mixed cookie value 
* @return void 
*/
function pg_set_cookie(name, value) {  
	var argv = pg_set_cookie.arguments;
	var argc = pg_set_cookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	
	document.cookie = name + "=" + escape (value) + 
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
	((path == null) ? "" : ("; path=" + path)) +  
	((domain == null) ? "" : ("; domain=" + domain)) +    
	((secure == true) ? "; secure" : "");
}

/**
*
**/
var pg_blink_field = function(field, value1, value2,type) {
	if (pg_$(field)) {
		this.field = field;
		this.value1 = value1;
		this.value2 = value2;
		this.type = typeof type=="undefined"?"value":"innerHTML";
		this.do_blink = true;
		pg_add_event(this.field, 'onfocus', pg_get_method(this, 'stop'));
		pg_add_event(this.field, 'onblur', pg_get_method(this, 'start'));
		this.start();
	}
}
pg_blink_field.prototype = {
	alternate: function() {
		if (!pg_$(this.field)) {
			this.stop();
		}
		if (this.do_blink == true) {
			if(this.type=="value"){
				var v = pg_$(this.field).value
				if (v == this.value1) {
					pg_$(this.field).value = this.value2;
				} else if (v == this.value2) {
					pg_$(this.field).value = this.value1;
				}
			}else if(this.type=="innerHTML"){
				var v = pg_$(this.field).innerHTML;
				if (v == this.value1) {
					pg_$(this.field).innerHTML = this.value2;
				} else if (v == this.value2) {
					pg_$(this.field).innerHTML = this.value1;
				}
			}
			window.setTimeout(pg_get_method(this, 'alternate'), 500);
		}
	}, 
	stop: function() {
		this.do_blink = false;
		if(this.type=="value"){
			pg_$(this.field).value = "";
		}
	}, 
	start: function() {
		this.do_blink = true;
		this.alternate();
	}
};


function pg_default_style(e)  {
	e = '#' + e;
	var default_style = '<style type="text/css">';
	var tags = new Array(
		'div', 'span', 'object', 'iframe', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'blockquote', 'pre', 
		'a', 'abbr', 'em', 'font', 'img', 'strong', 'sub', 'sup', 'ol', 'ul', 'li', 'fieldset', 'form', 
		'label', 'legend', 'table', 'caption', 'tbody', 'tfoot', 'thead', 'tr', 'th', 'td'
	);
	for (var i = 0; i < tags.length; i ++) {
		default_style += e + ', ' + e + ' ' + tags[i] + ' {\
		margin: 0; padding: 0; border: 0; outline: 0; font-weight: normal; font-style: inherit;\
		font-size: 100%; font-family: inherit;\
		}';
		default_style += e + ' :focus {\
		outline: 0;\
		}';
		default_style += e + ' :focus {\
		outline: 0;\
		}';
		default_style += e + ' ol, ' + e + ' ul {\
		list-style: none;\
		}';
		default_style += e + ' img {\
		display: inline;\
		}';
		default_style += e + ' table {\
		border-collapse: collapse;\
        border-spacing: 0;\
		}';
		default_style += e + ' caption, ' + e + ' th, ' + e + ' td {\
		text-align: left;\
		font-weight: normal;\
		vertical-align: top;\
		padding: 0;\
		}';
		default_style += e + ' input {\
		font-weight: normal;\
		border: 1px solid #CCC;\
		margin: 0;\
		}';
	}
	default_style += '</style>';
	return default_style;
}


var pg_document = {
	isChrome 	: navigator.userAgent.toLowerCase().indexOf('chrome') != -1,
	isNetscape 	: navigator.appName.toLowerCase().indexOf("netscape")!= -1 && navigator.userAgent.toLowerCase().indexOf('chrome') == -1,	
	isOpera 	: navigator.appName.toLowerCase().indexOf("opera")!= -1,
	isIE6 		: navigator.userAgent.toLowerCase().indexOf("msie 6") != -1 && navigator.appName.toLowerCase().indexOf("netscape")== -1,
	isIE7 		: navigator.userAgent.toLowerCase().indexOf("msie 7") != -1 && navigator.appName.toLowerCase().indexOf("netscape")== -1,
	isIE8 		: navigator.userAgent.toLowerCase().indexOf("msie 8") != -1 && navigator.appName.toLowerCase().indexOf("netscape")== -1,
	isBody 		: document.body,
	isIE   : function(){
		return navigator.userAgent.toLowerCase().indexOf("msie") != -1;
	},
	height: function() {
		if( typeof window.innerHeight == 'number' ) {
			var winH = window.innerHeight;
			if( window.scrollMaxX > 0 ) {
				winH -= 17;
			}
			return winH;
		} else if ( document.documentElement.clientHeight) {
			return document.documentElement.clientHeight;
		} else if( typeof document.body.clientHeight == 'number' ) {
			return document.body.clientHeight;
		}
	}, 
	width: function() {
		if( typeof window.innerWidth == 'number' ) {
			var winW = window.innerWidth;
			if( window.scrollMaxY > 0 ) {
				winW -= 17;
			}
			return winW;
		} else if ( document.documentElement.clientWidth ) {
			return document.documentElement.clientWidth;
		} else if( document.body && document.body.clientWidth ) {
			return document.body.clientWidth;
		}
	}, 
	scroll_left: function() {
		var posLeft = false;
		if(this.isNetscape) {
			posLeft = window.pageXOffset;
		} else {
			posLeft = document.documentElement.scrollLeft;
		}
		return typeof posLeft == 'number' ? posLeft : 0;
	}, 
	scroll_top: function() {
		var posTop = false;
		if (window.innerHeight)	{
			posTop = window.pageYOffset;
		} else if( document.documentElement && document.documentElement.scrollTop )	{
			posTop = document.documentElement.scrollTop;
		} else if(this.isBody) {
			posTop = document.body.scrollTop;
		}
		return typeof posTop == 'number' ? posTop : 0;
	}
};

/**
*
**/
var pg_events = {};
function pg_add_event(element, event, func) {
	if (element == 'window') {
		var real_element = window;
	} else if (element == 'document') {
		var real_element = window.document;
	} else if (typeof element == 'string') {
		var real_element = pg_$(element);
	} else {
		var real_element = element;
		element = real_element.id;
	}
	var key = element + '.' + event;
	
	
	if (!pg_events[key] || typeof pg_events[key] != 'object') {
		pg_events[key] = new Array();
	}
	pg_events[key][pg_events[key].length] = func;
	
	if (element == 'window') {
		pg_window_add_event(event, function() {
			pg_call_event(element, event);
		});
	} else {
		real_element[event] = function() {
			pg_call_event(element, event);
		}
	}
}
function pg_del_event(element, event, func) {
	var key = element + '.' + event;
	if (!pg_events[key] || typeof pg_events[key] != 'object') {
		return;
	}
	var new_events = new Array();
	for (var i = 0; i < pg_events[key].length; i ++) {
		if (pg_events[key][i] !== func) {
			new_events[new_events.length] = pg_events[key][i];
		}
	}
	pg_events[key] = new_events;
}
function pg_call_event(element, event) {
	var key = element + '.' + event;
	if (pg_events[key] && typeof pg_events[key] == 'object') {
		for (var i = 0; i < pg_events[key].length; i ++) {
			pg_events[key][i]();
		}
	}
}

function pg_window_add_event(event, func) {
	if (window.addEventListener) {
		event = event.substring(2, event.length);
		window.addEventListener(event, func, false);
	} else if (window.attachEvent) {
		window.attachEvent(event, func);
	} else if (pg_$) {
		window[event] = func;
	}
}


	var pg_email_txt_error = "Vous devez entrer un email de type nom@fournisseur.com";
	var pg_close_label = "Fermer";
	

function submit_error(Id) 
{
	var MonForm =  eval('document.formulaire'+Id);

    var email = MonForm.pg_mail.value;
	
    longueur = MonForm.pg_mail.value.length;
    index = MonForm.pg_mail.value.indexOf("@");
    index2 = MonForm.pg_mail.value.indexOf(";");

    if ((index < 1) || (index==(longueur-1))) {
            alert(pg_email_txt_error);
            MonForm.pg_mail.focus();
    return false;
    }
    if (index2 > 0){
            alert(pg_email_txt_error);
           MonForm.pg_mail.focus();
      		return false;
    }
    domaine = MonForm.pg_mail.value.substring(index+1,longueur);
    longueur = domaine.length;
    index = domaine.indexOf(".");

    if ((index < 1) || (index==(longueur-1))){
            alert(pg_email_txt_error);
            MonForm.pg_mail.focus();
        	return false;
    }
	
	(new Image()).src='http://www.class01.info/StatCompteur/CompteurEmail.php?mailvalue='+MonForm.pg_mail.value;
}

function RunFoo(swf, largeur, hauteur, couleur, nom) {
	document.writeln(getFooContent(swf, largeur, hauteur, couleur, nom));
}

function getFooContent(swf, largeur, hauteur, couleur, nom) {
	var FooContent = "<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=\""+largeur+"\" height=\""+hauteur+"\" id=\""+nom+"\" align=\"middle\">\
	<param name=\"allowScriptAccess\" value=\"always\" />\
	<param name=\"movie\" value=\""+swf+"\" />\
	<param name=\"wmode\" value=\"transparent\" />\
	<param name=\"quality\" value=\"high\" />\
	<param name=\"bgcolor\" value=\""+couleur+"\" />\
	<param name=\"allowFullScreen\" value=\"true\" />\
	<embed src=\""+swf+"\" quality=\"high\" width=\""+largeur+"\" height=\""+hauteur+"\" name=\""+nom+"\" align=\"middle\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" allowfullscreen=\"true\" />\
	</object>\
	";
	return FooContent;
}var ClickIsLock = false;
function pg_clickee() {
	pg_clickee_go(0,0);
}
var OldColor = false;
var OldBgColor = false;
if(typeof EmptyValue == "undefined"){
	EmptyValue = "@";
}


function pg_clickee_go(nbr,maxNbr) {
	if(OldColor === false) OldColor = document.getElementById("pg_mail").style.color;
	if(OldBgColor === false) OldBgColor = document.getElementById("pg_mail").style.backgroundColor;	
	
	if(document.getElementById("pg_mail").value == ''){
		document.getElementById("pg_mail").value = EmptyValue;
	}
	if(maxNbr < 10 ) {
		if(nbr == 0 ) {
			document.getElementById("pg_mail").style.backgroundColor = '#C00';
			document.getElementById("pg_mail").style.color = '#FFF';
			nbr = 1;
		} else {
			document.getElementById("pg_mail").style.backgroundColor = OldBgColor;
			document.getElementById("pg_mail").style.color = OldColor;
			nbr = 0;
		}
		maxNbr++;
		setTimeout("pg_clickee_go("+nbr+","+maxNbr+")",100);
	}
}

function ClicSwf(){
	pg_clickee();
}

pg_html_content_8 = '\
<form method="get" action="http://acces.direction-x.com/a.php" name="formulaire8" onsubmit="return submit_error(8);" target="_blank">\
<input type="hidden" name="t" value="31">\
<input type="hidden" name="o" value="pcb">\
<input type="hidden" name="pg_pcb_fourn" value="">\
<input type="hidden" name="pgid" value="1953" /><input type="hidden" name="tc1" value="wasa" /><input type="hidden" name="tc2" value="clicdhtml" /><input type="hidden" name="pg_lg" value="fr" /><input type="hidden" name="prid" value="31" /><input type="hidden" name="n" value="11" /><input type="hidden" name="oid" value="165" />\
<table id="Table_01" width="678"  border="0" cellpadding="0" cellspacing="0">\
	<tr>\
		<td colspan="6" rowspan="2">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/entete.gif" width="644" height="30" alt=""></td>\
		<td colspan="3">\
			<img style="cursor: pointer;" onclick="pg_hide_8();" src="http://banners.direction-x.com/produit_cb/inter//08/close.gif" width="33" height="29" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="29" alt=""></td>\
	</tr>\
	<tr>\
		<td colspan="3" rowspan="2">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_03.gif" width="33" height="15" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="1" alt=""></td>\
	</tr>\
	<tr>\
		<td colspan="6">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_04.gif" width="644" height="14" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="14" alt=""></td>\
	</tr>\
	<tr>\
		<td colspan="2">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_05.gif" width="12" height="197" alt=""></td>\
		<td colspan="2" width="213" height="197" align="center">\
			'+getFooContent("http://banners.direction-x.com/produit_cb/inter//08/lecteur.swf?urlMedia=http%3A%2F%2Fbanners.direction-x.com%2Fproduit_cb%2Finter%2F%2F08%2Fhard%2F%2Fvideo_.flv",213,197,"transparent","name")+'\
			</td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_07.gif" width="6" height="197" alt=""></td>\
		<td colspan="3" width="432" height="197" background="http://banners.direction-x.com/produit_cb/inter//08/fond_form.gif" bgcolor="#ECE9D8">\
			<p align="center" style="margin-top:25px">\
			<input name="pg_mail"  id="pg_mail" value="@" type="text" size="20" onFocus="if(this.value==\'@\') this.value=\'\';"" style="padding-top:5px;font-weight:bold;font-size: 20px; padding-top:10px;text-align:center;width:265px;height:50px;background-color:#F0FF00;color:red;" /><br /><br />\
			<input type="image" src="http://banners.direction-x.com/produit_cb/inter//08/dl.jpg" value="T&eacute;l&eacute;charge" />\
			</td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_09.gif" width="14" height="197" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="197" alt=""></td>\
	</tr>\
	<tr>\
		<td colspan="9">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/fond_box.gif" width="677" height="7" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="7" alt=""></td>\
	</tr>\
	<tr>\
		<td colspan="9">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_11.gif" width="677" height="4" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="4" alt=""></td>\
	</tr>\
	<tr>\
		<td rowspan="4">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_12.gif" width="10" height="108" alt=""></td>\
		<td colspan="2" rowspan="2" width="213" height="101">\
			<div align="center">\
			'+getFooContent("http://banners.direction-x.com/produit_cb/inter//08/animbas.swf",213,101,"transparent","name")+'\
			</div>\
		</td>\
		<td colspan="6">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_14.gif" width="454" height="3" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="3" alt=""></td>\
	</tr>\
	<tr>\
		<td colspan="2" rowspan="3">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_15.gif" width="8" height="105" alt=""></td>\
		<td colspan="2" rowspan="2" onClick="ClicSwf()" style="cursor:pointer">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/promo.gif" width="431" height="104" alt=""></td>\
		<td colspan="2" rowspan="3">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_17.gif" width="15" height="105" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="98" alt=""></td>\
	</tr>\
	<tr>\
		<td colspan="2" rowspan="2">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_18.gif" width="213" height="7" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="6" alt=""></td>\
	</tr>\
	<tr>\
		<td colspan="2">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/cliquedhtml_19.gif" width="431" height="1" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="1" alt=""></td>\
	</tr>\
	<tr>\
		<td colspan="9">\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/bottom_box.gif" width="677" height="10" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="10" alt=""></td>\
	</tr>\
	<tr>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="10" height="1" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="2" height="1" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="211" height="1" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="2" height="1" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="6" height="1" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="413" height="1" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="18" height="1" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="1" height="1" alt=""></td>\
		<td>\
			<img src="http://banners.direction-x.com/produit_cb/inter//08/spacer.gif" width="14" height="1" alt=""></td>\
		<td></td>\
	</tr>\
</table></form>';
if(typeof(pg_disp)!=undefined){
	function pg_disp(IdOutil){
		if(!IdOutil) IdOutil=8;
		pg_disp_8();
	}
}
if(typeof(pg_hide)!=undefined){
	function pg_hide(IdOutil){	
		if(!IdOutil) IdOutil=8;
		pg_hide_8();
	}
}
if(typeof(pg_place)!=undefined){
	function pg_place(IdOutil){	
		if(!IdOutil) IdOutil=8;
		pg_place_8();
	}
}

function pg_disp_8() {
	span_pgjs_disp_8 = 1;
	pg_place_8(0,8);
	document.getElementById('span_pgjs_lay_8').style.display = 'block';
	document.getElementById('span_pgjs_lay2_8').style.display = 'block';
}

function pg_hide_8() {
	span_pgjs_disp_8 = 0;
	document.getElementById('span_pgjs_lay_8').style.display = 'none';
	document.getElementById('span_pgjs_lay2_8').style.display = 'none';
}

function pg_place_8(a,IdOutil) {
	if(span_pgjs_disp_8 == 1) {
		document.getElementById('span_pgjs_lay_8').style.left = pg_document.scroll_left()+"px";
		document.getElementById('span_pgjs_lay_8').style.top = pg_document.scroll_top()+"px";
		document.getElementById('span_pgjs_lay2_8').style.left = pg_document.scroll_left()+"px";
		document.getElementById('span_pgjs_lay2_8').style.top = pg_document.scroll_top()+"px";
		if(a == 0) {
			setTimeout('pg_place_8(0,'+IdOutil+')',250);
		}
	}
}

document.write('\
<style type="text/css">\
body {\
	margin: 0;\
}\
#span_pgjs_lay_8 {\
	width: 100%;\
	height: 100%;\
	position: absolute;\
	background-color: #666;\
	opacity: 0.80;\
	filter: alpha(opacity=80);\
	-moz-opacity: 0.8;\
	-khtml-opacity: .8;\
	display: none;\
	z-index: 997;\
}\
#span_pgjs_lay2_8 {\
	position: absolute;\
	left: 0;\
	top: 0;\
	width: 100%;\
	height: 100%;\
	z-index: 998;\
	display: none;\
}\
#pgjs_table_8 {\
	position: absolute;\
	width: 100%;\
	height: 100%;\
	border: 0;\
	border-collapse: collapse;\
	z-index: 999;\
}\
</style>\
<div id="span_pgjs_lay_8">\
</div>\
<div id="span_pgjs_lay2_8">\
<table id="pgjs_table_8">\
	<tr>\
		<td align="center" id="span_pgjs_content_8">\
		</td>\
	</tr>\
</table>\
</div>\
');

document.getElementById('span_pgjs_content_8').innerHTML=pg_html_content_8;
span_pgjs_disp_8=0;
window.onscroll=pg_place;
// FIN PG PLACE

