//Function to open pop up window
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}

//Function to open preview post window
function kb_hear(page)
{
	window.open(page,"kblisten","width=594,height=292,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,status=no");
}

//Function to open preview post window
function kb_radio(page)
{
	window.open(page,"kbradio","width=594,height=400,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,status=no");
}


// CREDITS:
// Simple OneLineScroller by Urs Dudli and Peter Gehrig 
// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.com.
// info@24fun.ch
// 6/6/2000

// IMPORTANT: 
// If you add this script to a script-library or script-archive 
// you have to add a hyperlink to http://www.24fun.com on the webpage 
// where this script will be running.

// INSTALLATION:
// 	1.	Download 
// 		'http://www.24fun.com/downloadcenter/textonelinescroller/textonelinescroller_e.html' 
// 		and save it as HTML-file.
// 	2.	Configure the messages inside the head section of the script like this:
//		message[indexnumber]="text of title|text of copy|URL of link"
//	3.	Configure the variables inside the head section of the script: 
//		font-family, font-size, background-color, scrollerwidth and so on.

<!--                
var message= new Array()

// Configure each message below like this:
// message[indexnumber]="text of title|text of copy|URL of link"
// You may add as many messages as you like.

message[0]="ZANZANA|Tous les jeudi </br>de 21h30 à 00h00....|/rtci/zanzana/"
message[1]="ZANZANA|Le meilleur du Metal, du Hard,</br>de l'Alternatif...|/rtci/zanzana/"
message[2]="ZANZANA|découvrez la PLAY LIST</br>des titres diffusés|/rtci/zanzana/playlist/last/index.asp?lea=zanzan"
message[3]="Youssef Chahine|Ecoutez l'interview du dimanche 29 août 2004... </br>Alexandrie New York|/ecouter/index.asp?lejm=Youssef Chahine"
message[4]="OPUS|Tous les vendredi à 21h00... </br>26 minutes pour découvrir un album|/rtci/opus/"
message[5]="Interviews|Ecoutez mes interviews... </br>en MP3|/ecouter/"
message[6]="CA DEMENAGE|Interviews, tubes, jeux, </br>duplexs, correspondances...|/rtci/cademenage/"
message[7]="CA DEMENAGE|Tous les samedi 16h00-20h00...</br>CA DEMENAGE!!!|/rtci/cademenage/"
message[8]="CA DEMENAGE|découvrez la PLAY LIST</br>des titres diffusés|/rtci/cademenage/playlist/last/index.asp?lea=cadem"
message[9]="Tarak Ben Ammar|Ecoutez l'interview du samedi 21 août 2004... </br>La Passion du Christ|/ecouter/cinema/index.asp?lejm=Tarak%20Ben%20Ammar"
message[10]="OPUS|Tous les vendredi à 21h00... </br>26 minutes pour découvrir un album|/rtci/opus/"
message[11]="Interviews|Ecoutez mes interviews... </br>en MP3|/ecouter/"


// height of the scrollerbox (pixels)
var scrollerheight=20

// width of the titlezone (pixels)
var titlezonewidth=180

// width of the copyzone (pixels)
var copyzonewidth=440

// horizonal position: distance to the top border of the window (pixels)
var scrollertop=20

// vertical position: distance to the left border of the window (pixels)
var scrollerleft=20

// borderwidth of the scroller
var scrollerborder=2

// backgroundcolor for the titlezone
var titlezonebg="123456"

// backgroundcolor for the copyzone
var copyzonebg="CC0000"

// backgroundcolor for the scroller
var scrollbg="AAAAAA"

// The target of your links
// possible values are '_blank', '_self', '_top', '_parent' or the name of
// the target window for instance 'main'
var targetlink="_self"

// font attributes of the title
var font_titleface="Verdana"
var font_titlecolor="FFFFFF"
var font_titlesize=2

// font attributes of the copytext
var font_copyface="Verdana"
var font_copycolor="FFFFFF"
var font_copysize=2

// set 1 for bold title, set 0 for normal title
var titlebold=1

// set 1 for bold copy, set 0 for normal copy
var copybold=1

// set 'right', 'left' or 'center' to align the title
var titlealign="right"

// set 'right', 'left' or 'center' to align the copy
var copyalign="center"

// standstill between the messages (milliseconds)
var standstill=1000

// Do not edit below this line
var pre_titlebold
var after_titlebold
var pre_copybold
var after_copybold

var cliptop=0
var clipbottom=0
var clipleft=0
var clipright=titlezonewidth+copyzonewidth

var i_message=0
var mes_joined
var mes_split
var contenttext
var contentbg=""

var step=1
var pause=20

if (titlebold==1) {
	pre_titlebold="<b>"
	after_titlebold="</b>"
}
else if (titlebold==0) {
	pre_titlebold=""
	after_titlebold=""
}

if (copybold==1) {
	pre_copybold="<b>"
	after_copybold="</b>"
}
else if (copybold==0) {
	pre_copybold=""
	after_copybold=""
}

function initiate() {
		mes_joined=message[i_message]
		mes_split=mes_joined.split("|")
		
		contenttext="<table cellpadding=4 cellspacing=0 border=0>"
		contenttext+="<tr valign='top'>"
		contenttext+="<td align="+titlealign+" width="+titlezonewidth+" height='"+scrollerheight+"' bgcolor='"+titlezonebg+"'>"
		contenttext+="<a href='"+mes_split[2]+"' target='"+targetlink+"'>"
		contenttext+="<font face='"+font_titleface+"' color='"+font_titlecolor+"' size='"+font_titlesize+"'>"
		contenttext+=pre_titlebold
		contenttext+=mes_split[0]
		contenttext+=after_titlebold
		contenttext+="</font></a></td>"
		contenttext+="<td align="+copyalign+" width="+copyzonewidth+" height='"+scrollerheight+"' bgcolor='"+copyzonebg+"'>"
		contenttext+="<a href='"+mes_split[2]+"' target='"+targetlink+"'>"
		contenttext+="<font face='"+font_copyface+"' color='"+font_copycolor+"' size='"+font_copysize+"'>"
		contenttext+=pre_copybold
		contenttext+=mes_split[1]
		contenttext+=after_copybold
		contenttext+="</font></a></td></tr>"
		contenttext+="</table>"
		
		var bg_width=titlezonewidth+copyzonewidth+2*scrollerborder
		var bg_height=scrollerheight+2*scrollerborder
		
		contentbg="<table width="+bg_width+" height='"+bg_height+"' cellpadding=0 cellspacing=0 border='"+scrollerborder+"'><tr><td bgcolor='"+scrollbg+"'>&nbsp;</td></tr></table>"
	
	if (document.all) {
		scrollertext.innerHTML=contenttext
//		scrollerbg.innerHTML=contentbg
		document.all.scrollertext.style.posTop=scrollertop+scrollerheight
		document.all.scrollertext.style.posLeft=scrollerleft
//		document.all.scrollerbg.style.posTop=scrollertop-scrollerborder
//		document.all.scrollerbg.style.posLeft=scrollerleft-scrollerborder
		document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
		scrollin()
	}
	if (document.layers) {
		document.scrollertext.document.write(contenttext)
		document.scrollertext.document.close()
//		document.scrollerbg.document.write(contentbg)
//		document.scrollerbg.document.close()
		document.scrollertext.top=scrollertop+scrollerheight
		document.scrollertext.left=scrollerleft
//		document.scrollerbg.top=scrollertop-scrollerborder
//		document.scrollerbg.left=scrollerleft-scrollerborder
		document.scrollertext.clip.left=clipleft
        document.scrollertext.clip.right=clipright
        document.scrollertext.clip.top=cliptop
        document.scrollertext.clip.bottom=clipbottom
		scrollin()
	}
}

function scrollin(){
	if (document.all){
		if (document.all.scrollertext.style.posTop>scrollertop) {
			clipbottom+=step
			document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
			document.all.scrollertext.style.posTop-=step
			var timer=setTimeout("scrollin()",pause)
		}
		else {
			clearTimeout(timer)
			var timer=setTimeout("scrollout()",standstill)
		}
	}
	if (document.layers){
		if (document.scrollertext.top>scrollertop) {
			clipbottom+=step
			document.scrollertext.clip.left=clipleft
        	document.scrollertext.clip.right=clipright
        	document.scrollertext.clip.top=cliptop
        	document.scrollertext.clip.bottom=clipbottom
			document.scrollertext.top-=step
			var timer=setTimeout("scrollin()",pause)
		}
		else {
			clearTimeout(timer)
			var timer=setTimeout("scrollout()",standstill)
		}
	}
}

function scrollout(){
	if (document.all){
		if (document.all.scrollertext.style.posTop>(scrollertop-scrollerheight)) {
			cliptop+=step
			document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
			document.all.scrollertext.style.posTop-=step
			var timer=setTimeout("scrollout()",pause)
		}
		else {
			clearTimeout(timer)
			changemessage()
		}
	}
	if (document.layers){
		if (document.scrollertext.top>(scrollertop-scrollerheight)) {
			cliptop+=step
			document.scrollertext.clip.left=clipleft
        	document.scrollertext.clip.right=clipright
        	document.scrollertext.clip.top=cliptop
        	document.scrollertext.clip.bottom=clipbottom
			document.scrollertext.top-=step
			var timer=setTimeout("scrollout()",pause)
		}
		else {
			clearTimeout(timer)

			changemessage()
		}
	}
}

function changemessage(){
		i_message++
		if (i_message>message.length-1) {i_message=0}
		mes_joined=message[i_message]
		mes_split=mes_joined.split("|")
		cliptop=0
		clipbottom=0
		
		contenttext="<center><table cellpadding=4 cellspacing=0 border=0>"
		contenttext+="<tr valign='top'>"
		contenttext+="<td align="+titlealign+" width="+titlezonewidth+" height='"+scrollerheight+"' bgcolor='"+titlezonebg+"'>"
		contenttext+="<a href='"+mes_split[2]+"' target='"+targetlink+"'>"
		contenttext+="<font face='"+font_titleface+"' color='"+font_titlecolor+"' size='"+font_titlesize+"'>"
		contenttext+=pre_titlebold
		contenttext+=mes_split[0]
		contenttext+=after_titlebold
		contenttext+="</font></a></td>"
		contenttext+="<td align="+copyalign+" width="+copyzonewidth+" height='"+scrollerheight+"' bgcolor='"+copyzonebg+"'>"
		contenttext+="<a href='"+mes_split[2]+"' target='"+targetlink+"'>"
		contenttext+="<font face='"+font_copyface+"' color='"+font_copycolor+"' size='"+font_copysize+"'>"
		contenttext+=pre_copybold
		contenttext+=mes_split[1]
		contenttext+=after_copybold
		contenttext+="</font></a></td></tr>"
		contenttext+="</table></center>"
	
	if (document.all) {
		scrollertext.innerHTML=contenttext
		document.all.scrollertext.style.posTop=scrollertop+scrollerheight
		document.all.scrollertext.style.posLeft=scrollerleft
		document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
		scrollin()
	}
	if (document.layers) {
		document.scrollertext.document.write(contenttext)
		document.scrollertext.document.close()
		document.scrollertext.top=scrollertop+scrollerheight
		document.scrollertext.left=scrollerleft
		document.scrollertext.clip.left=clipleft
        document.scrollertext.clip.right=clipright
        document.scrollertext.clip.top=cliptop
        document.scrollertext.clip.bottom=clipbottom
		scrollin()
	}
}

//======================================================
// Script pour info bulles


<!--
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").style.left=e.pageX + 5+"px";
    GetId("curseur").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) {
  GetId("curseur").style.visibility="visible"; // Si il est cacher (la verif n'est qu'une securité) on le rend visible.
  GetId("curseur").innerHTML = text; // on copie notre texte dans l'élément html
  i=true;
  }
}
function cache() {
if(i==true) {
GetId("curseur").style.visibility="hidden"; // Si la bulle est visible on la cache
i=false;
}
}
document.onmousemove=move; // dès que la souris bouge, on appelle la fonction move pour mettre à jour la position de la bulle.
//-->
