// JavaScript Document
	function yourSite(id,t){
	 new Ajax.Request('share/ajax/show_site.php?id='+id+'&type='+t,{
	  parameters: 'none',
		onLoading: function(){
		 //$('loading').show();
		},
		onSuccess: function(transport) {
		 var raspuns = transport.responseText;
		 $('showpages').show();
		 $('showpages').innerHTML = raspuns;
		 //$('loading').hide();
	   }  
    });
  }

	function loadLastTemplate(){
	 new Ajax.Request('share/ajax/show_carousel.php',{
	  parameters: 'none',
		onLoading: function(){
		 //$('loading').show();
		},
		onSuccess: function(transport) {
		 var raspuns = transport.responseText;
		 $('loadtmp').show();
		 $('loadtmp').innerHTML = raspuns;
		 //$('loading').hide();
	   }  
    });
  }


  function sendInvoice(id){
	var form = $('contactz').serialize(true)
	new Ajax.Request('share/ajax/send_invoice.php?id='+id, {
	method: 'post', parameters: form,
			onLoading: function(){
			$('lts').show();
			$('contactz').hide();
			},
			onSuccess: function(transport) {
		    var raspuns = transport.responseText;
			 //alert(raspuns);
			 $('dcontact').show();
 		     $('dcontact').innerHTML = raspuns;			 
		     $('lts').hide();
			}
		});
 }  

  function sendInvoiceHost(){
	var form = $('contactz').serialize(true)
	new Ajax.Request('share/ajax/send_invoice_host.php', {
	method: 'post', parameters: form,
			onLoading: function(){
			$('lts').show();
			$('contactz').hide();
			},
			onSuccess: function(transport) {
		    var raspuns = transport.responseText;
			 //alert(raspuns);
			 $('dcontact').show();
 		     $('dcontact').innerHTML = raspuns;			 
		     $('lts').hide();
			}
		});
 } 
	function viewYoutube(){
	 new Ajax.Request('share/ajax/view_youtube.php',{
	  parameters: 'none',
		onLoading: function(){
		 //$('loading').show();
		},
		onSuccess: function(transport) {
		 var raspuns = transport.responseText;
		 $('myou').show();
		 $('myou').innerHTML = raspuns;
		 //$('loading').hide();
	   }  
    });
  } 
	function showHost(id){
	 new Ajax.Request('share/ajax/view_host.php?pic='+id,{
	  parameters: 'none',
		onLoading: function(){
		 //$('loading').show();
		},
		onSuccess: function(transport) {
		 var raspuns = transport.responseText;
		 $('shost').show();
		 $('shost').innerHTML = raspuns;
		 //$('loading').hide();
	   }  
    });
  }

	function showPrice(id1,id2){
		var num;
	if(document.getElementById(id1).value){
	}else{
		document.getElementById(id1).value='1';
		}
	if(document.getElementById(id2).value){
	}else{
		document.getElementById(id2).value='1';
		}		
		
     document.getElementById('prix').value = document.getElementById(id1).value * document.getElementById(id2).value;
	 //alert(document.getElementById('prix').value);
	 num= document.getElementById('prix').value;
	 $('calcul').innerHTML = 'Total : '+num.toFixed(2)+' &euro;';
   }

function showDiv(id){
  document.getElementById(id).style.display='block';
} 
function showHide(id){
 if(document.getElementById(id).style.display=='none'){
   document.getElementById(id).style.display='block';
 }else if(document.getElementById(id).style.display=='block'){
    document.getElementById(id).style.display='none';
 }
}


function hideDiv(id){
  document.getElementById(id).style.display='none';
}
function goGo(url){
 return document.location.href=url;	
 }


 function openW(url,w,h){
	window.open(url,'','scrollbars=yes,width='+w+',height='+h);
 }

function noError(){return true;}
window.onerror = noError;
