$(document).ready(function(){ 
  $(document).pngFix();
	$('a[@rel*=lightbox]').lightBox();
});

String.prototype.classExists=function class_exists(classe){
  if(this!=""){
    all_class=this;
    var ar_all_class=all_class.split(' ');
    for(o=0;o<ar_all_class.length;o++){
      if(ar_all_class[o]==classe){
        return true;
        break;
      }
    }
    return false;
  }
  else{
    return false;
  }
  
}

function submitcontact(which){
  var all_ext=new Array();
  setfalse=true;
  all_ext=which.getElementsByTagName('input');
  for(i=0;i<all_ext.length;i++){
    var the_i=all_ext[i];
    if(the_i.className.classExists("obligatoire")){
    	if(the_i.value==''){
				the_i.parentNode.className="notassigned";
  			setfalse=false;
  		}
    	else the_i.parentNode.className="";
    }
  }
  all_ext=document.getElementsByTagName('select');
  for(i=0;i<all_ext.length;i++){
    var the_i=all_ext[i];
    if(the_i.className.classExists("obligatoire")){
    	if(the_i.value==''){
				the_i.parentNode.className="notassigned";
  			setfalse=false;
  		}
    	else the_i.parentNode.className="";
    }
  }
  all_ext=document.getElementsByTagName('textarea');
  for(i=0;i<all_ext.length;i++){
    var the_i=all_ext[i];
    if(the_i.className.classExists("obligatoire")){
    	if(the_i.value==''){
				the_i.parentNode.className="notassigned";
  			setfalse=false;
  		}
    	else the_i.parentNode.className="";
    }
  }
  return setfalse;
}
