function setBgColor (elementID, color) {
  if (document.all){
    document.all[elementID].style.backgroundColor = color;
  }else if (document.getElementById){
    document.getElementById(elementID).style.backgroundColor = color;
  }
  
}

 function toSt(n)
 {s=""
  if(n<10) s+="0"
  return s+n.toString();
 }
 
 function countdown()
 {
var eventdate = new Date("June 1, 2007 00:00:00 GMT");	 
  d=new Date();
  count=Math.floor((eventdate.getTime()-d.getTime())/1000);
  if(count<=0)
    {document.getElementById("days").innerHTML="----";
     document.getElementById("hours").innerHTML="--";
     document.getElementById("mins").innerHTML="--";
     document.getElementById("secs").innerHTML="--";
     return;
    }
	
temp = toSt(count%60);

if(temp =="01")
word = "second";
else
word = "seconds";

  document.getElementById("secs").innerHTML = temp + " " + word;
  count=Math.floor(count/60);
  

temp = toSt(count%60); 
if(temp =="01")
word = "minute";
else
word = "minutes";
  
  document.getElementById("mins").innerHTML = temp + " " + word;
  count=Math.floor(count/60);
  
temp = toSt(count%60); 
if(temp =="01")
word = "hour";
else
word = "hours";  
  
  document.getElementById("hours").innerHTML = temp + " " + word;
  count=Math.floor(count/24);
  
temp = count; 
if(temp =="1")
word = "day";
else
word = "days";   
 
  document.getElementById("days").innerHTML = temp + " " + word;
  
  setTimeout("countdown()",500);
 }

var flashlinks=new Array()

function changelinkcolor(){
for (i=0; i< flashlinks.length; i++){
var flashtype=document.getElementById? flashlinks[i].getAttribute("flashtype")*1 : flashlinks[i].flashtype*1
var flashcolor=document.getElementById? flashlinks[i].getAttribute("flashcolor") : flashlinks[i].flashcolor
if (flashtype==0){
if (flashlinks[i].style.color!=flashcolor)
flashlinks[i].style.color=flashcolor
else
flashlinks[i].style.color=''
}
else if (flashtype==1){
if (flashlinks[i].style.backgroundColor!=flashcolor)
flashlinks[i].style.backgroundColor=flashcolor
else
flashlinks[i].style.backgroundColor=''
}
}
}

function init(){
var i=0
if (document.all){
while (eval("document.all.flashlink"+i)!=null){
flashlinks[i]= eval("document.all.flashlink"+i)
i++
}
}
else if (document.getElementById){
while (document.getElementById("flashlink"+i)!=null){
flashlinks[i]= document.getElementById("flashlink"+i)
i++
}
}
setInterval("changelinkcolor()", 600)
}

if (window.addEventListener)
window.addEventListener("load", init, false)
else if (window.attachEvent)
window.attachEvent("onload", init)
else if (document.all)
window.onload=init

function toggleLayer(whichLayer)
{
if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(whichLayer).style;

if(style2.display == "block")
style2.display = "none";
else
style2.display = "block";


}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[whichLayer].style;

if(style2.display == "block")
style2.display = "none";
else
style2.display = "block";

}
else if (document.layers)
{
// this is the way nn4 works
var style2 = document.layers[whichLayer].style;

if(style2.display == "block")
style2.display = "none";
else
style2.display = "block";

}

return true;

}

function toggleimg(whichImg){
	
var domain = "http://www.4hip.co.uk/";

var img = document.images[whichImg];

if(img.src == domain + "hip-layout/help-plus.gif")
img.src = domain + "hip-layout/help-minus.gif";
else
img.src = domain + "hip-layout/help-plus.gif";

return false;

}

function jumpmenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}