// JavaScript Document

// from heading.asp //
function writelink(url,attrib)
{
	document.write('<a href="'+url+'" '+attrib+' >');
}
function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=500,left = 150,top = 20');");
}
// end from heading.asp //

function gotopage(theurl){
var win2=null;
win2=window.open(theurl);
}

function roll(img_name, img_src)
   {
   document[img_name].src = img_src;
   }


function falsefunc()
{
//alert("Hello");
}


function openpoll()
{
var day = new Date();
var id = day.getTime();
var win2=window.open("/poll","win3", "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 150,top = 20");
}

/*Example message arrays for the two demo scrollers*/

var error_correct=0
var pausecontent2 = new Array()
var pausecontent2_time=new Array()
 //pausecontent2[0] = "";
 //pausecontent2[1] = "";
function getXMLHTTPRequestTicker() {
	var xRequest=null;
		if (window.XMLHttpRequest) {
			xRequest=new XMLHttpRequest();
		}else if (typeof ActiveXObject != "undefined"){
			xRequest=new ActiveXObject("Microsoft.XMLHTTP");
		}
	return xRequest;
	}
	
	function sendRequestTicker(url, params, HttpMethod, callbackFunc){
		if (!HttpMethod){
			HttpMethod="GET";
		}
		var req=getXMLHTTPRequestTicker();
		if (req){
			req.onreadystatechange=function(){
				callbackFunc(req);
			};
			req.open(HttpMethod, url, true);
			req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			req.send(params);
		}
	}
	function getTicker(){
				
		filename="/showticker.asp?previewticker=";
		sendRequestTicker(filename, null, "GET", displayTicker);
	}

	function displayTicker(req){
		if(req.readyState==4){
			//new showLocalTime("servertime", "", -1, "short",req.responseText)
			 
			 var tricker = req.responseText.split("|");
			 for (i = 1; i < tricker.length ; i++)
			 {
			 	pausecontent2[i-1] = tricker[i];
			 }
			new pausescroller(pausecontent2, "pscroller2", "someclass", 5000)
		}
	}												
/***********************************************
* Pausing up-down scroller- ? Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.getElementById("divTicker").innerHTML='<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1"><span class=tickertext >'+content[0]+'</span></div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2"><span class=tickertext >'+content[1]+'</span></div></div>';

var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
{
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
}
else if (window.attachEvent) //run onload in IE5.5+
{
window.attachEvent("onload", function(){scrollerinstance.initialize()})

}
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
{
setTimeout(function(){scrollerinstance.initialize()},10)
}
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
//document.all.datetimeid.innerHTML=pausecontent2_time[0]
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})


setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){

var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+1)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-1+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-1+"px"
setTimeout(function(){scrollerinstance.animateup()}, 70)
}
else{

this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
if(error_correct==0)
{
//document.all.datetimeid.innerHTML=pausecontent2_time[1]
error_correct++
}

var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){

var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
{
setTimeout(function(){scrollerinstance.setmessage()}, 100)

}
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
//document.all.datetimeid.innerHTML=pausecontent2_time[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}

function getXMLHTTPRequest() {
	var xRequest=null;
		if (window.XMLHttpRequest) {
			xRequest=new XMLHttpRequest();
		}else if (typeof ActiveXObject != "undefined"){
			xRequest=new ActiveXObject("Microsoft.XMLHTTP");
		}
	return xRequest;
	}
	
	function sendRequest(url, params, HttpMethod, callbackFunc){
		if (!HttpMethod){
			HttpMethod="GET";
		}
		var req=getXMLHTTPRequest();
		if (req){
			req.onreadystatechange=function(){
				callbackFunc(req);
			};
			req.open(HttpMethod, url, true);
			req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			req.send(params);
		}
	}
	function gettime(){
				
		var day = new Date();
	    var id = day.getTime();		
		
		var today;
        var ref;
        today = new Date();               
        ref=today.getYear()+"a"+today.getMonth()+"b"+today.getDate()+"c"+today.getHours()+"d"+today.getMinutes()+"e"+today.getSeconds();
		filename="/servertime.asp?ref="+ref;
		sendRequest(filename, null, "GET", displaytime);
	}

	function displaytime(req){
		if(req.readyState==4){
			new showLocalTime("servertime", "", -1, "short",req.responseText)
		}
	}												
							

/***********************************************
* Local Time script- © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var weekdaystxt=["Sunday", "Monday", "Tuesday", "Wed", "Thursday", "Friday", "Saturday"]
var weekdaystxt_800=["Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"] // for resolotion 800

function showLocalTime(container, servermode, offsetMinutes, displayversion,ssTime){
if (!document.getElementById || !document.getElementById(container)) return
this.container=document.getElementById(container)
this.displayversion=displayversion
var servertimestring=ssTime
this.localtime=this.serverdate=new Date(servertimestring)
this.localtime.setTime(this.serverdate.getTime()+offsetMinutes*60*1000) //add user offset to server time
this.updateTime()
this.updateContainer()
}

showLocalTime.prototype.updateTime=function(){
var thisobj=this
this.localtime.setMinutes(this.localtime.getMinutes()+1)
setTimeout(function(){thisobj.updateTime()}, 60000) //update time every minute
}

showLocalTime.prototype.updateContainer=function(){
var thisobj=this
if (this.displayversion=="long"){
	var thewidth=screen.width;
	var mm = getMonthName(this.localtime.getMonth())
	var hour=this.localtime.getHours()
	var minutes=this.localtime.getMinutes()
	var ampm=(hour>=12)? "PM" : "AM"

	if(thewidth<1024)
	{
		var dayofweek=weekdaystxt_800[this.localtime.getDay()]
		this.container.innerHTML='<b><font class=normal1>'+dayofweek+',&nbsp;'+mm+'&nbsp;'+this.localtime.getDate()+',&nbsp;'+this.localtime.getFullYear()+'&nbsp;&nbsp;Phuket time:&nbsp;'+formatField(hour, 1)+':'+formatField(minutes)+'&nbsp;'+ampm+'&nbsp;</font></b>'
	}
	else
	{
		var dayofweek=weekdaystxt[this.localtime.getDay()]
		url = location.href;
		
		if(url.indexOf("/classifieds/")>0 || url.indexOf("/issuesanswers/")>0 || url.indexOf("/bulletins/")>0 || url.indexOf("/digitalgazette3/")>0){
			this.container.innerHTML='<b><font face="Verdana" size=2 color="#000000">'+dayofweek+',&nbsp;'+mm+'&nbsp;'+this.localtime.getDate()+',&nbsp;'+this.localtime.getFullYear()+'<br>Phuket time:&nbsp;'+formatField(hour, 1)+':'+formatField(minutes)+'&nbsp;'+ampm+'&nbsp;</font></b>'

		}else{
			this.container.innerHTML='<b><font face="Verdana" size=2 color="#000000">'+dayofweek+',&nbsp;'+mm+'&nbsp;'+this.localtime.getDate()+',&nbsp;'+this.localtime.getFullYear()+'&nbsp;&nbsp;Phuket time:&nbsp;'+formatField(hour, 1)+':'+formatField(minutes)+'&nbsp;'+ampm+'&nbsp;</font></b>'
		}
	}
}
else{
var hour=this.localtime.getHours()
var minutes=this.localtime.getMinutes()
var seconds=this.localtime.getSeconds()
var ampm=(hour>=12)? "PM" : "AM"
//var dayofweek=weekdaystxt[this.localtime.getDay()]
var mm = getMonthName(this.localtime.getMonth())
this.container.innerHTML='<span id="timecontainer" class="tickertime"><nobr>&nbsp;'+mm+"&nbsp;"+this.localtime.getDate()+",&nbsp;"+this.localtime.getFullYear()+"&nbsp;-&nbsp;"+formatField(hour, 1)+":"+formatField(minutes)+"&nbsp;"+ampm+"&nbsp;</nobr></span>"
}
setTimeout(function(){thisobj.updateContainer()}, 60000) //update container every minute
}
function getMonthName(numMonth)
{
	if(numMonth==0)
	{
		return "January"
	}
	else if(numMonth==1)
	{
		return "Febuary"
	}
	else if(numMonth==2)
	{
		return "March"
	}
	else if(numMonth==3)
	{
		return "April"
	}
	else if(numMonth==4)
	{
		return "May"
	}
	else if(numMonth==5)
	{
		return "June"
	}
	else if(numMonth==6)
	{
		return "July"
	}
	else if(numMonth==7)
	{
		return "August"
	}
	else if(numMonth==8)
	{
		return "September"
	}
	else if(numMonth==9)
	{
		return "October"
	}
	else if(numMonth==10)
	{
		return "November"
	}
	else if(numMonth==11)
	{
		return "December"
	}
}
function formatField(num, isHour){
if (typeof isHour!="undefined"){ //if this is the hour field
var hour=(num>12)? num-12 : num
return (hour==0)? 12 : hour
}
return (num<=9)? "0"+num : num//if this is minute or sec field
}

function getXMLHTTPRequestLong() {
							var xRequest=null;
								if (window.XMLHttpRequest) {
									xRequest=new XMLHttpRequest();
								}else if (typeof ActiveXObject != "undefined"){
									xRequest=new ActiveXObject("Microsoft.XMLHTTP");
								}
							return xRequest;
							}
							
							function sendRequestLong(url, params, HttpMethod, callbackFunc){
								if (!HttpMethod){
									HttpMethod="GET";
								}
								var req=getXMLHTTPRequestLong();
								if (req){
									req.onreadystatechange=function(){
										callbackFunc(req);
									};
									req.open(HttpMethod, url, true);
									req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
									req.send(params);
								}
							}
							function gettimeLong(){
										
								var day = new Date();
								var id = day.getTime();		
								
								var today;
								var ref;
								today = new Date();               
								ref=today.getYear()+"a"+today.getMonth()+"b"+today.getDate()+"c"+today.getHours()+"d"+today.getMinutes()+"e"+today.getSeconds();
								filename="/servertime.asp?ref="+ref;
								sendRequestLong(filename, null, "GET", displaytimeLong);
							}
						
							function displaytimeLong(req){
								if(req.readyState==4){
									//new showLocalTime("servertime", "", -1, "short",req.responseText)
									new showLocalTime("servertime_time", "", -1, "long",req.responseText)
								}
							}
function newwindow(URL){
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=800,height=450,left = 150,top = 20');");
}	
function mouseoverheader(idchange1){
	newImage = "url(/images/1024/button_header_light.gif)";
	document.getElementById(idchange1).style.backgroundImage = newImage;
}
function mouseoutheader(idchange2){
	newImage = "url(/images/1024/button_header_dark.gif)";
	document.getElementById(idchange2).style.backgroundImage = newImage;
}
function writelinkandevent(url,attrib,divid)
{
	document.write('<a href="'+url+'" '+attrib+'><div class="htb20" id="'+divid+'" onMouseOver="mouseoverheader(\''+divid+'\')" onMouseOut="mouseoutheader(\''+divid+'\')"><font color="#FFFFFF">');
}
function getdivtype(typenews){
	//alert(typenews);
	if(typenews==1){
		//alert(typenews);
		document.getElementById("newsflash").style.display = 'block'; 
		document.getElementById("newshound").style.display = 'none'; 
		document.getElementById("tabnewshound1").src = '/includepages/sub1-light.gif'; 
		document.getElementById("tabnewshound2").bgColor = '#cccccc'; 
		document.getElementById("tabnewshound3").src = '/includepages/sub2-light.gif'; 
		document.getElementById("tabnewshound4").src = '/includepages/sub3-light.gif'; 
		document.getElementById("tabnewsflash1").src = '/includepages/sub1.gif'; 
		document.getElementById("tabnewsflash2").bgColor = '#ff3300'; 
		document.getElementById("tabnewsflash3").src = '/includepages/sub2.gif'; 
		document.getElementById("tabnewsflash4").src = '/includepages/sub3-hound.gif'; 
		document.getElementById("fontnewsflash").style.color = '#ffffff'; 
		document.getElementById("bordertab").bgColor = '#ff3300'; 
		document.getElementById("fontnewshound").style.color = '#029602'; 
	}else{
		document.getElementById("newsflash").style.display = 'none'; 
		document.getElementById("newshound").style.display = 'block'; 
		document.getElementById("tabnewsflash1").src = '/includepages/sub1-light.gif'; 
		document.getElementById("tabnewsflash2").bgColor = '#cccccc'; 
		document.getElementById("tabnewsflash3").src = '/includepages/sub2-light.gif'; 
		document.getElementById("tabnewsflash4").src = '/includepages/sub3-light.gif'; 
		document.getElementById("tabnewshound1").src = '/includepages/Light-Green_1.gif'; 
		document.getElementById("tabnewshound2").bgColor = '#02b502'; 
		document.getElementById("tabnewshound3").src = '/includepages/Light-Green_2.gif'; 
		document.getElementById("tabnewshound4").src = '/includepages/Light-Green_3.gif'; 
		document.getElementById("fontnewshound").style.color = '#ffffff'; 
		document.getElementById("fontnewsflash").style.color = '#ff3300'; 
		document.getElementById("bordertab").bgColor = '#02b502'; 
		
	}
}
function mouseouttabindex(idchange){
			//alert(document.getElementById("flagtabnewshound").value);
		if(document.getElementById("newsflash").style.display == "block"){
			if(idchange == 1){
				document.getElementById("tabnewsflash1").src = '/includepages/sub1.gif'; 
				document.getElementById("tabnewsflash2").bgColor = '#ff3300'; 
				document.getElementById("tabnewsflash3").src = '/includepages/sub2.gif'; 
				document.getElementById("tabnewsflash4").src = '/includepages/sub3-hound.gif'; 
				document.getElementById("fontnewsflash").style.color = '#ffffff'; 
			}else{
			//alert(document.getElementById("flagtabnewsflash").value);
				document.getElementById("tabnewshound1").src = '/includepages/sub1-light.gif'; 
				document.getElementById("tabnewshound2").bgColor = '#cccccc'; 
				document.getElementById("tabnewshound3").src = '/includepages/sub2-light.gif'; 
				document.getElementById("tabnewshound4").src = '/includepages/sub3-light.gif'; 
				document.getElementById("fontnewshound").style.color = '#029602'; 
			}
		}else{
			if(idchange == 1){
				//alert("111");
				document.getElementById("tabnewsflash1").src = '/includepages/sub1-light.gif'; 
				document.getElementById("tabnewsflash2").bgColor = '#cccccc'; 
				document.getElementById("tabnewsflash3").src = '/includepages/sub2-light.gif'; 
				document.getElementById("tabnewsflash4").src = '/includepages/sub3-light.gif'; 
				document.getElementById("fontnewsflash").style.color = '#ff3300'; 
			}else{
			//alert(document.getElementById("flagtabnewsflash").value);
				document.getElementById("tabnewshound1").src = '/includepages/Light-Green_1.gif'; 
				document.getElementById("tabnewshound2").bgColor = '#02b502'; 
				document.getElementById("tabnewshound3").src = '/includepages/Light-Green_2.gif'; 
				document.getElementById("tabnewshound4").src = '/includepages/Light-Green_3.gif'; 
				document.getElementById("fontnewshound").style.color = '#ffffff'; 
			}
		}
}
function mouseovertabindex(idchange){
			//alert(document.getElementById("flagtabnewshound").value);
		if(document.getElementById("newsflash").style.display == "block"){
			if(idchange == 1){
				document.getElementById("tabnewsflash1").src = '/includepages/sub1.gif'; 
				document.getElementById("tabnewsflash2").bgColor = '#ff3300'; 
				document.getElementById("tabnewsflash3").src = '/includepages/sub2.gif'; 
				document.getElementById("tabnewsflash4").src = '/includepages/sub3-hound.gif'; 
				document.getElementById("fontnewsflash").style.color = '#ffffff'; 
			}else{
			//alert(document.getElementById("flagtabnewsflash").value);
				document.getElementById("tabnewshound1").src = '/includepages/Light-Green_1.gif'; 
				document.getElementById("tabnewshound2").bgColor = '#02b502'; 
				document.getElementById("tabnewshound3").src = '/includepages/Light-Green_2.gif'; 
				document.getElementById("tabnewshound4").src = '/includepages/Light-Green_3.gif'; 
				document.getElementById("fontnewshound").style.color = '#ffffff'; 
			}
		}else{
			if(idchange == 1){
				document.getElementById("tabnewsflash1").src = '/includepages/sub1.gif'; 
				document.getElementById("tabnewsflash2").bgColor = '#ff3300'; 
				document.getElementById("tabnewsflash3").src = '/includepages/sub2.gif'; 
				document.getElementById("tabnewsflash4").src = '/includepages/sub3-hound.gif'; 
				document.getElementById("fontnewsflash").style.color = '#ffffff'; 
				document.getElementById("bordertab").bgColor = '#02b502';
			}else{
			//alert(document.getElementById("flagtabnewsflash").value);
				document.getElementById("tabnewshound1").src = '/includepages/Light-Green_1.gif'; 
				document.getElementById("tabnewshound2").bgColor = '#02b502'; 
				document.getElementById("tabnewshound3").src = '/includepages/Light-Green_2.gif'; 
				document.getElementById("tabnewshound4").src = '/includepages/Light-Green_3.gif'; 
				document.getElementById("fontnewshound").style.color = '#ffffff'; 
			}
		}
}
function mouseovertab(stay,id){
	//alert(document.getElementById("tab"+id).style.backgroundImage);
	//alert(id);
	//if(stay == 1){
		if(id == 1){
			bgcolor = '/includepages/tabnewshound/Daily-color.gif';
		}else if(id == 2){
			bgcolor = '/includepages/tabnewshound/Events-color.gif';
		}else if(id == 3){
			bgcolor = '/includepages/tabnewshound/Issues-color.gif';
		}else if(id == 4){
			bgcolor = '/includepages/tabnewshound/Classifieds-color.gif';
		}else if(id == 5){
			bgcolor = '/includepages/tabnewshound/Queer-color.gif';
		}else if(id == 6){
			bgcolor = '/includepages/tabnewshound/Home-color.gif';
		}
		//alert(document.getElementById("tab"+id).src);
		document.getElementById("tab"+id).src=bgcolor;
		document.getElementById("tab"+id).style.cursor='pointer';
	//}
}
function mouseouttab(stay,id){
	//alert(id);
	if(stay == 1){
		if(id == 1){
			bgcolor = '/includepages/tabnewshound/Daily-color.gif';
		}else if(id == 2){
			bgcolor = '/includepages/tabnewshound/Events-gray.gif';
		}else if(id == 3){
			bgcolor = '/includepages/tabnewshound/Issues-gray.gif';
		}else if(id == 4){
			bgcolor = '/includepages/tabnewshound/Classifieds-gray.gif';
		}else if(id == 5){
			bgcolor = '/includepages/tabnewshound/Queer-gray.gif';
		}else if(id == 6){
			bgcolor = '/includepages/tabnewshound/Home-gray.gif';
		}
	}else if(stay == 2){
		if(id == 1){
			bgcolor = '/includepages/tabnewshound/Daily-gray.gif';
		}else if(id == 2){
			bgcolor = '/includepages/tabnewshound/Events-color.gif';
		}else if(id == 3){
			bgcolor = '/includepages/tabnewshound/Issues-gray.gif';
		}else if(id == 4){
			bgcolor = '/includepages/tabnewshound/Classifieds-gray.gif';
		}else if(id == 5){
			bgcolor = '/includepages/tabnewshound/Queer-gray.gif';
		}else if(id == 6){
			bgcolor = '/includepages/tabnewshound/Home-gray.gif';
		}
	}else if(stay == 3){
		if(id == 1){
			bgcolor = '/includepages/tabnewshound/Daily-gray.gif';
		}else if(id == 2){
			bgcolor = '/includepages/tabnewshound/Events-gray.gif';
		}else if(id == 3){
			bgcolor = '/includepages/tabnewshound/Issues-color.gif';
		}else if(id == 4){
			bgcolor = '/includepages/tabnewshound/Classifieds-gray.gif';
		}else if(id == 5){
			bgcolor = '/includepages/tabnewshound/Queer-gray.gif';
		}else if(id == 6){
			bgcolor = '/includepages/tabnewshound/Home-gray.gif';
		}
	}else if(stay == 4){
		if(id == 1){
			bgcolor = '/includepages/tabnewshound/Daily-gray.gif';
		}else if(id == 2){
			bgcolor = '/includepages/tabnewshound/Events-gray.gif';
		}else if(id == 3){
			bgcolor = '/includepages/tabnewshound/Issues-gray.gif';
		}else if(id == 4){
			bgcolor = '/includepages/tabnewshound/Classifieds-color.gif';
		}else if(id == 5){
			bgcolor = '/includepages/tabnewshound/Queer-gray.gif';
		}else if(id == 6){
			bgcolor = '/includepages/tabnewshound/Home-gray.gif';
		}
	}else if(stay == 5){
		if(id == 1){
			bgcolor = '/includepages/tabnewshound/Daily-gray.gif';
		}else if(id == 2){
			bgcolor = '/includepages/tabnewshound/Events-gray.gif';
		}else if(id == 3){
			bgcolor = '/includepages/tabnewshound/Issues-gray.gif';
		}else if(id == 4){
			bgcolor = '/includepages/tabnewshound/Classifieds-gray.gif';
		}else if(id == 5){
			bgcolor = '/includepages/tabnewshound/Queer-color.gif';
		}else if(id == 6){
			bgcolor = '/includepages/tabnewshound/Home-gray.gif';
		}
	}else if(stay == 6){
		if(id == 1){
			bgcolor = '/includepages/tabnewshound/Daily-gray.gif';
		}else if(id == 2){
			bgcolor = '/includepages/tabnewshound/Events-gray.gif';
		}else if(id == 3){
			bgcolor = '/includepages/tabnewshound/Issues-gray.gif';
		}else if(id == 4){
			bgcolor = '/includepages/tabnewshound/Classifieds-gray.gif';
		}else if(id == 5){
			bgcolor = '/includepages/tabnewshound/Queer-gray.gif';
		}else if(id == 6){
			bgcolor = '/includepages/tabnewshound/Home-color.gif';
		}
	}
	//alert(document.getElementById("tab"+id).src);
	//alert(bgcolor);
	document.getElementById("tab"+id).src=bgcolor;
}