function createTarget(t,width,height){
window.open("", t, "width="+width+",height="+height);
return true;
}


function GetId(id)
{
return document.getElementById(id);
}
var i=false; // La variable i nous dit si la bulle est visible ou non
 
function move(e) {
  if(i) {  // Si la bulle est visible, on calcul en temps reel sa position ideale
    if (navigator.appName!="Microsoft Internet Explorer") { // Si on est pas sous IE
    GetId("curseur_mozilla").style.left=e.pageX + 5+"px";
    GetId("curseur_mozilla").style.top=e.pageY + 10+"px";
    }
    else { // Modif proposÃ© par TeDeum, merci Ã  lui
    if(document.documentElement.clientWidth>0) {
	GetId("curseur").style.left=20+event.x+document.documentElement.scrollLeft+"px";
	GetId("curseur").style.top=10+event.y+document.documentElement.scrollTop+"px";
    } else {
	GetId("curseur").style.left=20+event.x+document.body.scrollLeft+"px";
	GetId("curseur").style.top=10+event.y+document.body.scrollTop+"px";
	     }
    }
  }
}
 
function montre(text) {
  if(i==false) {
  	 if (navigator.appName!="Microsoft Internet Explorer")
  	 {
  GetId("curseur_mozilla").style.visibility="visible"; // Si il est cacher (la verif n'est qu'une securitÃ©) on le rend visible.
  GetId("curseur_mozilla").innerHTML = text; // Cette fonction est a amÃ©liorer, il parait qu'elle n'est pas valide (mais elle marche)
  i=true;
}
else 
	{
		  GetId("curseur").style.visibility="visible"; // Si il est cacher (la verif n'est qu'une securitÃ©) on le rend visible.
  GetId("curseur").innerHTML = text; // Cette fonction est a amÃ©liorer, il parait qu'elle n'est pas valide (mais elle marche)
  i=true;
	}
  }
}
function cache() {
	 if (navigator.appName!="Microsoft Internet Explorer")
  	 {
if(i==true) {
GetId("curseur_mozilla").style.visibility="hidden"; // Si la bulle etais visible on la cache
i=false;
}
}
else 
	{
		if(i==true) {
GetId("curseur").style.visibility="hidden"; // Si la bulle etais visible on la cache
i=false;
}
	}

}
document.onmousemove=move; // des que la souris bouge, on appelle la fonction move pour mettre a jour la position de la bulle.



var newWin = null;
function closeWin(){
	if (newWin != null){
		if(!newWin.closed)
			newWin.close();
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function popup(strURL,strType,strHeight,strWidth) {
closeWin();
var strOptions="";
if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
if (strType=="scroll") strOptions="status,height="+strHeight+",width="+strWidth+",scrollbars";
newWin = window.open(strURL, 'newWin', strOptions);
newWin.focus();
}

function menu_redirige(url,log){
if(log!=0)
document.location=url;
else
alert('Vous devez être membre.');
}

function Lien() {

	i = document.Choix.Liste.selectedIndex;
	url = document.Choix.Liste.options[i].value;
	parent.location.href = url;
}

function LienSoonNight() {

	i = document.formVille.ListeSoonNight.selectedIndex;
	url = document.formVille.ListeSoonNight.options[i].value;
	parent.location.href = url;
}

function LienPhotosSoonNight() {
	i = document.formPhotosSoonNight.ListePhotosGroupes.selectedIndex;
	url = document.formPhotosSoonNight.ListePhotosGroupes.options[i].value;
	parent.location.href = url;
}


function menu_redirige(url,log){
if(log!=0)
document.location=url;
else
alert('Vous devez être membre.');
}

function ejs_nodroit()
{
 alert('Tous droits réservés 2005-2006 © wwww.soonlover.com');
 return(false);
}



cursor_padding=5;
nav = navigator.appName;	
ie = document.all;
ns = document.layers;
fi = document.getElementById && !document.all;

if(!ie){	
document.captureEvents(Event.MOUSEMOVE); 	
}

window.document.onmousemove = get_mouse;

function get_mouse(evt) {
	if(ie) {
		x =  event.clientX + 10;
		y = event.clientY + 5;
	} else {
		x = evt.pageX + 10;
		y = evt.pageY + 5;
	}

	bubble = document.getElementById("infobulle");
	

	if(ie) {	
	bubble.style.left = x + document.documentElement.scrollLeft + cursor_padding + 'px';		
	bubble.style.top = y + document.documentElement.scrollTop + cursor_padding + 'px';
	} 
	else {		
		bubble.style.left = x + cursor_padding + 'px';		
		bubble.style.top = y + cursor_padding + 'px';
	}

}

function see_bubble(text) {


	bubble.style.visibility = "visible";
	bubble.style.display = "block";
	bubble.innerHTML = text;
}

function kill_bubble() {
	bubble.style.visibility = "hidden";
	bubble.style.display = "none";
}


function NoError()
	{
	return true;
	}
window.onerror=NoError;







function open_popup_sms() { 
	 popup_sms=window.open("popup_sms.php", "DEDICACE", "width=615,height=370,status=none,scrollbars=no"); 
	 popup_sms.focus(); 
} 
function open_live_music() { 
	 popup_sms=window.open("popup_live_music.php", "LIVE", "width=485,height=375,status=none,scrollbars=no"); 
	 popup_sms.focus(); 
} 
function print_message() { 
	 document.write(''); 
} 

function writediv(texte)
{
document.getElementById('pseudobox').innerHTML = texte;
}

function verifPseudo(pseudo)
{
if(pseudo != '')
{
if(pseudo.length<4)
writediv('<span style="color:#cc0000"><b>'+pseudo+' :</b> ce pseudo est trop court</span>');
else if(pseudo.length>8)
writediv('<span style="color:#cc0000"><b>'+pseudo+' :</b> ce pseudo est trop long</span>');
else if(texte = file('verifpseudo.php?pseudo_2002='+escape(pseudo)))
{
if(texte == 1)
writediv('<span style="color:#cc0000"><b>'+pseudo+' :</b> ce pseudo est deja pris</span>');
else if(texte == 2)
writediv('<span style="color:#1A7917"><b>'+pseudo+' :</b> ce pseudo est libre</span>');
else
writediv(texte);
}
}
}
function file(fichier)
{
if(window.XMLHttpRequest) // FIREFOX
xhr_object = new XMLHttpRequest();
else if(window.ActiveXObject) // IE
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
else
return(false);
xhr_object.open("GET", fichier, false);
xhr_object.send(null);
if(xhr_object.readyState == 4) return(xhr_object.responseText);
else return(false);
}


function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}

function agrandir() {
  false;
}

function openNewWindow(page, nom, hauteur, largeur) {
options='height='+hauteur+',width='+largeur+',left=2, top=2,toolbar=no,scrollbars=yes';
newWindow=window.open(page, nom,options); 
}

function OpenWin2(URL,width,height,nom)
{
	window.open(URL,nom,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=yes");
}


function afficheMaxi(chemin)
	{
	Imageslim = new Image;
	Imageslim.src = chemin;
	titre='Clubbing Tunis, Hammamet, Sousse & Boite de nuit Tunis';
	popupImage = window.open('','grande','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,height=10,width=10,left=0, top=0');
	html = '<HTML><HEAD><TITLE>TunisNightLive.com : Clubbing en Tunisien : Boite de nuit Tunis</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0 bgcolor="#EEEFF3">';
	html =html+'<table border=0 cellspacing=0 cellpadding=1 align=center><tr><td><a href="#" onClick="javascript:window.close()"><IMG SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+12,document.imageTest.height+100);window.moveTo(100,200);self.focus();"></a></td></tr></table>';
	html=html+'<table width="100%"  border="0" cellpadding="0" cellspacing="0">';
    html=html+'<tr><td align="center" valign="center" bgcolor="#00245F"><font color="#FFFFFF" face="verdana" size="1"><b>TunisNightLive.com : Clubbing en Tunisien : Boite de nuit Tunis</b></font></td>';
	html=html+'<td align="center" bgcolor="#00245F">';
    html=html+'<a href="#" onClick="javascript:window.close()"><font color="#FFFFFF" face="verdana" size="1"><b>Fermer</b></font></a>&nbsp;&nbsp;</td></tr>';
    html=html+'</table>';
	html=html+'</BODY></HTML>';
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close();
	}

function PopupFenster111() {
  F = window.open("fenetre_popup.html","Popup","width=330,height=240,top=300,left=300");
}

function ajout(login_from,login_to) {
  F = window.open("amis.php?login_from=<?=$test_login?>&login_to="+login_to,"Popup","width=140,height=125,top=138,left=138");
}

function voter(ttt) {
  F = window.open("voter.php?zbr_23_enix="+ttt,"Popup","width=180,height=175,top=138,left=138");
}

function vote_music(ttt) {
  F = window.open("voter_music.php?id_music="+ttt,"Popup","width=250,height=175,top=138,left=138");
}

function OpenAmi(ttt) {
  F = window.open("OpenAmi.php?id_soirees="+ttt,"Popup","width=450,height=450,top=138,left=138");
}

function PopupFenster222() {
  F = window.open("fenetre_popup2.html","Popup","width=330,height=240,top=300,left=300");
}

function PopupFenster333() {
  F = window.open("fenetre_popup3.html","Popup","width=330,height=240,top=300,left=300");
}

function PopupFenster444() {
  F = window.open("fenetre_popup4.html","Popup","width=330,height=240,top=300,left=300");
}

function tecktonik1() {
  F = window.open("tecktonik1.html","Popup","width=320,height=245,top=300,left=300");
}

function tecktonik2() {
  F = window.open("tecktonik2.html","Popup","width=320,height=245,top=300,left=300");
}

function tecktonik3() {
  F = window.open("tecktonik3.html","Popup","width=320,height=245,top=300,left=300");
}

function tecktonik4() {
  F = window.open("tecktonik4.html","Popup","width=320,height=245,top=300,left=300");
}

function tecktonik5() {
  F = window.open("tecktonik5.html","Popup","width=320,height=245,top=300,left=300");
}

function tecktonik6() {
  F = window.open("tecktonik6.html","Popup","width=320,height=245,top=300,left=300");
}


function clignotement(){ 
	if(document.getElementById("txtClignotant"))
	{
	
	vartemp = '#FF0000' ;
	
    if (document.getElementById("txtClignotant").style.color!="") 
       document.getElementById("txtClignotant").style.color=""; 
    else 
       document.getElementById("txtClignotant").style.color=vartemp;
	}
	if(document.getElementById("txtClignotant2"))
	{ 
	
	vartemp2 = '#FF0000' ;
	
    if (document.getElementById("txtClignotant2").style.color!="") 
       document.getElementById("txtClignotant2").style.color=""; 
    else 
       document.getElementById("txtClignotant2").style.color=vartemp2; 
	}
	
	if(document.getElementById("txtClignotant3"))
	{ 
	
	vartemp3 = '#FF0000' ;
	
    if (document.getElementById("txtClignotant3").style.color!="") 
       document.getElementById("txtClignotant3").style.color=""; 
    else 
       document.getElementById("txtClignotant3").style.color=vartemp3; 
	}
	
	if(document.getElementById("txtClignotant4"))
	{ 
	
	vartemp4 = '#FF0000' ;
	
    if (document.getElementById("txtClignotant4").style.color!="") 
       document.getElementById("txtClignotant4").style.color=""; 
    else 
       document.getElementById("txtClignotant4").style.color=vartemp4; 
	}
	
	if(document.getElementById("txtClignotant5"))
	{ 
	
	vartemp5 = '#FF0000' ;
	
    if (document.getElementById("txtClignotant5").style.color!="") 
       document.getElementById("txtClignotant5").style.color=""; 
    else 
       document.getElementById("txtClignotant5").style.color=vartemp4; 
	}
} 
 
setInterval("clignotement()", 300); 

