function	checknewsletter(prefix)
{
		if ($('formchecknewsletter').src == prefix+'/39GeorgeVPictoCross.gif')
		{
			$('formchecknewsletter').src = prefix+'/39GeorgeVPictoCrossChecked.gif';
			$('newsletter').value = '1';
		}
		else
		{
			$('formchecknewsletter').src = prefix+'/39GeorgeVPictoCross.gif';
			$('newsletter').value = '0';
		}
}

function	changelistavis($pos)
{
		
}

function none()
{
	;
}

function change_menu(action, id)
{
        if (action == "over")
        {
                $(id).src = "./im/menu/"+id+"-on.gif";
        }
        else
        {
                $(id).src = "./im/menu/"+id+".gif";
        }
}


function aff_object(object, type, div)
{
	if (type == "image")
	{
		$(div).innerHTML = '<img style="display:block; border:1px SOLID #898989;" src="'+object+'" />';
	}
	if (type == "video")
	{
		$(div).innerHTML = '<object type="application/x-shockwave-flash" data="./players/lecteur-Album.swf" style="margin-top:5px;width:250px; height:200px;"><param name="movie" value="./players/lecteur-Album.swf"><param name="FlashVars" value="flv='+object+'&amp;showvolume=1&amp;showtime=1&amp;showstop=1&amp;buttonovercolor=FF0000&amp;autoplay=1&amp;margin=0&amp;loadingcolor=FF0000&amp;sliderovercolor=990000&amp;width=250&amp;height=200&amp;buffer=10"><param name="wmode" value="transparent"></object>';
	}
	if (type == "son")
	{
		$(div).innerHTML = '<img src="./im/podcast.gif" alt=""><object type="application/x-shockwave-flash" data="./players/dewplayer.swf?son='+object+'" height="20" width="200">';
	}
	if (type == "file")
	{
		$(div).innerHTML = '<a href="'+object+'" target="_BLANK"><img src="./im/default-size4.jpg" style="display:block; border:0px solid #FFFFFF;" /></a>';
	}
}

function show_hide_menu_left(id)
{
	if ($(id).style.display == "none")
	{
		$(id+"_plus").src = "./im/picto_plus.gif";
		$(id).style.display = "";
	}
	else
	{
		$(id+"_plus").src = "./im/picto_moins.gif";
		$(id).style.display = "none";
	}	
}

function blindDiv (id) {
	if ($(id).getStyle('display') == 'none') {
		Effect.BlindDown(id);
	} else {
		Effect.BlindUp(id);
	}
}

function changeStateBtnCheckBox(obj, id)
{
	$(id).checked = !($(id).checked);

	if (obj.src.match(new RegExp('Off\.jpg')))
		obj.src = obj.src.replace('Off\.jpg', 'On\.jpg');
	else
		obj.src = obj.src.replace('On\.jpg',  'Off\.jpg');
}

function changeStateBtnRadio(obj, id, name)
{
	var radio = document.getElementById(id);
	var tab = document.getElementsByName(name);
	
	radio.checked = true;

	var reg = new RegExp('Select');
	for (var i = 0; i < tab.length; i++)
	{
		if (tab[i] != radio)
		{
			var img = document.getElementById('radioImg'+tab[i].id);
			img.src = img.src.replace(reg, '');
		}
	}
	var reg = new RegExp('\.jpg');
	if (!obj.src.match(new RegExp('Select')))
		obj.src = obj.src.replace(reg, 'Select\.jpg');
}

function resetStateBtnRadio(name){
	/*var radio = document.getElementById(id);*/
	var tab = document.getElementsByName(name);
	
	var reg = new RegExp('Select');
	for (var i = 0; i < tab.length; i++)
	{
		
			var img = document.getElementById('radioImg'+tab[i].id);
			img.src = img.src.replace(reg, '');
		
	}
	var reg = new RegExp('\.jpg');
	/*obj.src = obj.src.replace(reg, 'Select\.jpg');*/
}


function editProfileUpdateImg(fullPath, imgName)
{
	$('PATprofilImage').value = imgName;
	$('PATprofilImageContainer').src = fullPath;
}

function getPageSize(){

        var xScroll, yScroll;

        if (window.innerHeight && window.scrollMaxY) {
                xScroll = document.body.scrollWidth;
                yScroll = window.innerHeight + window.scrollMaxY;
        } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
                xScroll = document.body.scrollWidth;
                yScroll = document.body.scrollHeight;
        } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
                xScroll = document.body.offsetWidth;
                yScroll = document.body.offsetHeight;
        }

        var windowWidth, windowHeight;
        if (self.innerHeight) { // all except Explorer
                windowWidth = self.innerWidth;
                windowHeight = self.innerHeight;
        } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
                windowWidth = document.documentElement.clientWidth;
                windowHeight = document.documentElement.clientHeight;
        } else if (document.body) { // other Explorers
                windowWidth = document.body.clientWidth;
                windowHeight = document.body.clientHeight;
        }
		
	 	
        // for small pages with total height less then height of the viewport
        if(yScroll < windowHeight){
                pageHeight = windowHeight;
        } else {
                pageHeight = yScroll;
        }

        // for small pages with total width less then width of the viewport
        if(xScroll < windowWidth){
                pageWidth = windowWidth;
        } else {
                pageWidth = xScroll;
        }
		
        arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
        return arrayPageSize;
}

function HidePopup(id){

	$('Dblur').setStyle({ display:'none' });
	$(id).hide();
	
}

function hideDiv(id){
	$(id).hide();
}

function showDiv(id){
	$(id).show();
}

function showPopUp(id,backgrd) {
	
	var doAnimations = true;
	if(backgrd!=null){
		//$(backgrd).setStyle({ left: '0px', top: '0px', width: getPageSize()[0]+'px', height: getPageSize()[1]+'px'});
		$(backgrd).setStyle({ left: '0px', top: '0px', width: '100%', height: document.getElementById('the_main_id').offsetHeight+'px'});
		$(backgrd).show();
	}
	else if( document.getElementById('Dblur') ){
		$('Dblur').setStyle({ left: '0px', top: '0px', width: '100%', height: document.getElementById('the_main_id').offsetHeight+'px'});
		$('Dblur').show();
	}
	
	var screenWidth  = document.viewport.getWidth();
	var screenHeight = document.viewport.getHeight();
	
	var dOffsets = document.viewport.getScrollOffsets();
	var screenTop  = dOffsets.top;
	var screenLeft = dOffsets.left;
	
	var divWidth  = $(id).getWidth();
	var divheight = $(id).getHeight();
	
	var newPosX = screenLeft + ( (screenWidth - divWidth) / 2);
	var newPosY = screenTop + ( (screenHeight - divheight) / 2);
	
	$(id).setStyle({left: newPosX+'px', top: newPosY+'px'});
	
	$(id).show();
	
}



function reset_form()
{
	$('confirm_form').hide();
	$('AE-homeFormNom').value = "";
	$('AE-homeFormPrenom').value = "";
	$('AE-homeFormTel').value = "";
	$('AE-homeFormMail').value = "";
	$('AE-homeFormVille').value = "";
	$('AE-homeFormDate_rdzvous').value = "";
	$('AE-homeFormCodepromo').value = "";
	$('AE-homeFormCpostal').value = "";
	$('AE-homeFormAdresse').value = "";
	$('AE-homeFormInfosacces').value = "";
	$('AE-homeFormDescription').value = "";
	$('AE-homeFormOsWindows').select = false;
	$('AE-homeFormOsLinux').select = false;
	$('AE-homeFormOsMac').select = false;
}

function  reset_form_offresurmesure(){
	$('confirm_form').hide();
	
	
	$('Fof-homeFormNom').value = "";
	$('Fof-homeFormPrenom').value = "";
	$('Fof-homeFormTel').value = "";
	$('Fof-homeFormMail').value = "";
	$('Fof-homeFormAdresse').value = "";
	$('Fof-homeFormVille').value = "";
	$('Fof-homeFormCpostal').value = "";
	
	$('Fof-typeOrdi1').checked = 0;
	$('Fof-typeOrdi2').checked = 0;
	
	resetStateBtnRadio('Fof-typeOrdi');
	
	hideDiv('Offre_sur_mesure_fixe');
	hideDiv('Offre_sur_mesure_portable');
	
	resetStateBtnRadio('Fof-homePortableFormOs');
	resetStateBtnRadio('Fof-homePortableForm1s');
	resetStateBtnRadio('Fof-homePortableForm2s');
	resetStateBtnRadio('Fof-homePortableForm3s');
	
	resetStateBtnRadio('Fof-homeFixeFormOs');
	resetStateBtnRadio('Fof-homeFixeForm1s');
	resetStateBtnRadio('Fof-homeFixeForm2s');
	
}


function  reset_form_contact(){
	$('confirm_form').hide();
	
	
	$('AE-homeFormNom').value = "";
	$('AE-homeFormPrenom').value = "";
	$('AE-homeFormTel').value = "";
	$('AE-homeFormMail').value = "";
	$('AE-homeFormAdresse').value = "";
	$('AE-homeFormVille').value = "";
	$('AE-homeFormCpostal').value = "";
	$('AE-homeFormDescription').value = "";
	
	
}

function  reset_form_presse(){
	$('confirm_form').hide();
	
	
	$('AE-homeFormPressNom').value = "";
	$('AE-homeFormPressPrenom').value = "";
	$('AE-homeFormPressTel').value = "";
	$('AE-homeFormPressMail').value = "";
	$('AE-homeFormPressAdresse').value = "";
	$('AE-homeFormPressVille').value = "";
	$('AE-homeFormPressCpostal').value = "";
	
	$('AE-homeFormPressFonction').value = "";
	$('AE-homeFormPressMedia').value = "";
	$('AE-homeFormPressSiteWeb').value = "";
	$('AE-homeFormPressDescription').value = "";
	
	resetStateBtnRadio('homeFormPressType');
	
	
	
	
}


