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";
	}	
}


/*new Effect.Morph('error_message', {
  style: 'background:#f00; color: #fff;', // CSS Properties
  duration: 0.8 // Core Effect properties
});*/


function showRightMenuOver(id,over){

//Event.observe(window, "load", runTest);


	var contener=id+'_contener';
	
	var doAnimations = true;
	
	var Wright = $(contener).getWidth();
	
	if(over=='out'){
		$(id).morph('width:15px',{ duration: 0.6 }); 
		$(id+'_text').morph('color:#333',{ duration: 0.4 }); 
	}
	else{
	$(id).morph('width:'+Wright+'px',{ duration: 0.4 }); 
	$(id+'_text').morph('color:#fff',{ duration: 0.4 }); 
	}
	return false;
	
	/*
	if(contener!=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 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 showPopup_div(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();
	}*/
	if(typeof(sw)!='undefined'){
	sw.hide();
	delete sw;
	}
	
	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();
	
	if(typeof(sw)=='undefined'){
	sw = new UI.Shadow(id).show(); 
	}
}
function hidePopup_div(id){
	$(id).hide();
	sw.hide();
	delete sw;
}



function Popup_window(mid){


    /*w = new UI.Window({width: 200, top: 50, left: 110, shadow: true, close: false, minimize: false, maximize:false, resizable: false, draggable:false}).show(); 
    w.content.update($(id));
	*/
	
	//alert(getPageSize());
	/*var width = 200; 
	var height = 300;
	var spacing = 20;
	*/
	
	var divWidth  = $(mid).getWidth();
	var divheight = $(mid).getHeight();
	
	var width = divWidth+10; 
	var height = divheight+10;
	var spacing = 20;
	
	
	/*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  = width;
	var divheight = height;
	
	var newPosX = screenLeft + ( (screenWidth - divWidth) / 2);
	var newPosY = screenTop + ( (screenHeight - divheight) / 2);*/
	


    UI.Window.setOptions({
     /*	top: newPosY,
		left: newPosX,*/
	 /*id:'gagagad',*/
      width: width,
      height: height,
      shadow: true, 
      show: function(el) { el.appear({ duration: 0.2 }) },
      hide: function(el) { el.fade({ duration: 0.2 }) }
    });
    
    function openWindow(theme, index) {
      var options = {
		  
        theme: theme,
		shadow:true,
        /*shadowTheme: theme == "vista" ? "drop_shadow" : "mac_shadow",*/
		shadowTheme: "mac_shadow",
		
		
		/*close: false,
		minimize: false, 
		maximize:false, 
		resizable: false, 
		draggable:false,*/
		
        /*left: spacing + (width + spacing) * index,*/
		/*hide: Element.fade*/
		hide: function(ev) { ev.fade({ duration: 0.5 }) }
      };
      
	  var attributes= {
		id:mid  
	  };
     /* if (theme == "black_hud")
        options.shadow = false;*/
      
    //  var w = new UI.Window(options).setHeader(theme).setContent('dsfoisudfoisdufoiusdiofusdoifuiosdufiosdufiodsufoidsufiosdufoidsufiodus').show();
      
	// var w = new UI.Window(options).setContent('dsfoisudfoisdufoiusdiofusdoifuiosdufiosdufiodsufoidsufiosdufoidsufiodus').center().show();
    // alert(mid); 
	  var w = new UI.Window(options).center().show();
      w.content.update($(mid));
	  
	 
	 
      /*if (options.shadow)
        w.setFooter("Shadow Theme: " + w.getShadowTheme());*/
    }
  //  $w("alphacube mac_os_x bluelighting leopard vista black_hud").each(openWindow);
//	  $w("alphacube mac_os_x bluelighting leopard vista black_hud").each(openWindow);
	  $w("alphacube").each(openWindow);
	
	
	
	
	
  
	
}
