//Bookmark
function AddToBookmarks (url,title) { window.external.AddFavorite(url,title); }


//Drop-down menus
function leapto(form) {
var myindex=form.dest.selectedIndex
window.location=(form.dest.options[myindex].value);
}

//Rotate images
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = "img/promo/lionvibes1.gif"; 
theImages[1] = "img/promo/lionvibes2.gif"; 
theImages[2] = "img/promo/lionvibes3.gif"; 
theImages[3] = "img/promo/lionvibes4.gif"; 
theImages[4] = "img/promo/lionvibes5.gif"; 
theImages[5] = "img/promo/lionvibes6.gif"; 
theImages[6] = "img/promo/lionvibes7.gif"; 
// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(home){
	var path;
	if (home == false) {
		path = "../"; 
	}else {
		path = "";
	} 
	document.write('<img style="margin:2px 0px 0px 0px" src="'+path+theImages[whichImage]+'">');
}


function writeDate(){

	var now = new Date();

	var days = new Array('Sun','Mon','Tues','Wed','Thurs','Fri','Sat');

	var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

	var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

	function fourdigits(number) {return (number < 1000) ? number + 1900 : number;}
	today =  days[now.getDay()] + " " + months[now.getMonth()] + " " + date + " " + (fourdigits(now.getYear())) ;
	document.write(today)
}


function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}

function popWin(url){	

		var newwin = window.open(url,"subscribe","height=250,width=322,status=no,toolbar=no,menubar=no,scrollbars=no,top=10,left=10");
}
function popWin2(url){	

		var newwin2 = window.open(url,"competition","height=480,width=540,status=no,toolbar=no,menubar=no,scrollbars=no,titlebar=0, top=0,left=340");
}

function popWin3(url){	

		var newwin3 = window.open(url,"radio","height=103,width=303,status=no,toolbar=no,menubar=no,scrollbars=no,titlebar=0, top=10,left=140");
}

function popWin4(url){	

		var newwin4 = window.open(url,"terms","height=303,width=440,status=no,toolbar=no,menubar=no,scrollbars=yes,titlebar=0, top=10,left=100");
}
