// JavaScript Document

var position=0;  
function changestyle()
{
 				
 				
				if (document.getElementById('qbox').value == '') 
				{
								 	 document.getElementById('qbox').style.background = '#FFFFFF url(http:www.caradisiac.com/media/newhome/google_custom_search_watermark.gif) left no-repeat';
				}
				else{
				 					 document.getElementById('qbox').style.background = '#FFFFFF';
				}
}
      
function test_email(my_email) 
{
 				var new_string = new String(my_email);  
  			if (!new_string.match('^[-_\.0-9a-zA-Z]{1,}@[-_\.0-9a-zA-Z]{1,}[\.][0-9a-zA-Z]{2,}$')) 
		    {
		     		return false;
		    }
  			else 
    		{
    		 		 return true;
    		}
 } 

function ctrl()
{
  			if (FormRegist.email.value.length < 1 )
			  {
					window.alert("Vous devez saisir une adresse email");
			    return false;
			   }
			    
			  if (!test_email(FormRegist.email.value))
			  {   
					window.alert ("Vérifier la syntaxe de votre adresse email");
			    return false;                  
			  }
}

function shift_right()
{
		if(position==-10)
		{
		 		
					document.getElementById('btn_right').className='btn_right_stop';
					return;
        
		}
	  if(position==0)
		{
		 	
					document.getElementById('btn_left').className='btn_left_on';
				
        
		}
    
    position-=1;
    document.getElementById('actu_inner').style.marginLeft=(position*192)+'px';
}

function shift_left()
{
 		if(position==0)
		{
		 							 document.getElementById('btn_left').className='btn_left_stop';
									  return;
		}
    else if(position >= -10)
		{
									 document.getElementById('btn_right').className='btn_right_on';
									  
		}
		else if (position < -10)
		{
		 							
									document.getElementById('btn_right').className='btn_right_stop';
									  
		}   
    
    position+=1;
    document.getElementById('actu_inner').style.marginLeft=(position*192)+'px';
}

function OAS_NORMAL(pos) {
	document.write('<A HREF="' + OAS_url + 'click_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + OAS_query + '" TARGET=_top>');
	document.write('<IMG SRC="' + OAS_url + 'adstream_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + OAS_query + '" BORDER=0><\/A>');
	}
function OAS_AD(pos) {
	if (OAS_version >= 11)
	OAS_RICH(pos);
	else
	OAS_NORMAL(pos);
	}
function getObj(name) {
  if (document.getElementById)
   this.obj = document.getElementById(name);
  else if (document.all)
   this.obj = document.all[name];
  else if (document.layers)
   this.obj = document.layers[name];
  if (this.obj)
   this.style = this.obj.style;
 }

 function addLoad(func) {
  if (window.addEventListener)
   window.addEventListener("load", func, false);
  else if (document.addEventListener)
   document.addEventListener("load", func, false);
  else if (window.attachEvent)
   window.attachEvent("onload", func);
  else if (typeof window.onload != "function")
   window.onload = func;
  else {
   var oldonload = window.onload;
   window.onload = function() {
	oldonload();
	func();
   };
  }
 }

 function init() {
  var apos = OAS_listpos.split(',');
  var olddocwrite = document.write;
  for(var i = 0; i < apos.length; i++) {
   var object_togo = new getObj(OAS_litid[i]);
   var object_tomove = new getObj('Hidden'+OAS_litid[i]);
   html = "";
   if (typeof(object_togo.obj) != "undefined" && typeof(object_tomove.obj) != "undefined") {
    if(object_togo.obj && object_tomove.obj)
    {
    	object_togo.obj.appendChild(object_tomove.obj);
    	object_tomove.style.visibility = "visible";
    }
   }
  }
 }

function OAS_adJavascript()
{  
  if (navigator.userAgent.indexOf('Mozilla/3') != -1)
  OAS_version = 10;
  if (OAS_version >= 11)
  document.write('<' + 'SCRIPT LANGUAGE=JavaScript1.1 SRC="' + OAS_url + 'adstream_mjx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + OAS_query + '"><\/SCRIPT>');
}



function show_div_for_pub(div){
		var id_=document.getElementById(div);
		if(id_==null)return;
		var reg= new RegExp(".*/empty\.gif.*","i");
		var show = reg.test(id_.innerHTML);	
		if(show == false)
		{
							document.getElementById(div).style.display='block';
							
		}
}


