var is=new function()
{ 	
	this.VER=navigator.appVersion;
	this.AGENT=navigator.userAgent;
	this.DOM=(document.getElementById)?1:0;
	this.IE4=(document.all&&!this.DOM)?1:0;
	this.IE5=(this.VER.indexOf("MSIE 5")>-1&&this.DOM)?1:0; 
	this.IE6=(this.VER.indexOf("MSIE 6")>-1&&this.DOM)?1:0;
	this.IE=(this.IE4||this.IE5||this.IE6);	
	this.MAC=this.AGENT.indexOf("Mac")>-1;
	this.NS6=(document.getElementById&&!document.all)?1:0;
	this.NS4=(document.layers&&!this.DOM)?1:0;
	this.NS=(this.NS6||this.NS4);
	this.OPERA=this.AGENT.indexOf("Opera")>-1;
	return this;
};
function getElement(id)
{
	if(is.DOM)
	{
		return document.getElementById(id);
	}
	else if(is.IE)
	{
		return eval("document.all."+id);
	}
	else if(is.NS)
	{
		return eval("document."+id);
	};
	return false;
};
var canada="AB,BC,MB,NF,NB,NT,NS,ON,PE,QC,SK,YT";
function setCountry(state)
{
	state=state.toUpperCase();
	if(getElement("country")==undefined)
	{
		return;
	};
	var obj=getElement("country");
	if(state=="")
	{
		obj.selectedIndex=0;
	}
	else
	{
		obj.selectedIndex=(canada.indexOf(state)!=-1)?can:usa;
	};
};
function setState(country)
{	
	country=country.toUpperCase();
	if(getElement("state")==undefined) 
	{
		return;
	};
	var obj=getElement("state");
	if(country=="")
	{
		obj.selectedIndex=0;
	}
	else
	{
		if(country!="CANADA"||country!="USA")
		{
			obj.selectedIndex=0;
		}
		else if(country=="USA"&&canada.indexOf(obj[obj.selectedIndex].value)!=-1)
		{
			obj.selectedIndex=0;
		}
		else if(country=="CANADA"&&canada.indexOf(obj[obj.selectedIndex].value)==-1)
		{
			obj.selectedIndex=0;
		};
	};
};
function styleWebring()
{
	var objs = new Array('categoryClicks','webring');

	for(var i=0;i<objs.length;++i)
	{
		if(getElement(objs[i])!=undefined)
		{
			// Target object
			var obj = getElement(objs[i]);
		
			// Get html
			var new_html = obj.innerHTML;

			// Parse thru it
			new_html = new_html.replace(/border="?(1|0)"?/gi,'border="0" align="center" width="80%"');
			new_html = new_html.replace('tr ="center"','tr style="font-weight:bold"');
			new_html = new_html.replace('td','td nowrap');
			new_html = new_html.replace(/ffffcc/gi,'');
			new_html = new_html.replace(/ffffff/gi,'');
			new_html = new_html.replace(/000000/gi,'');
			new_html = new_html.replace(/black/gi,'');
			new_html = new_html.replace(/333399/gi,'');
			new_html = new_html.replace(/color: #;/gi,'');
			new_html = new_html.replace(/#/g,'""');
			new_html = new_html.replace(/.cc_/gi,'#cc');
			new_html = new_html.replace(/<font.*?>/gi,'');
			new_html = new_html.replace(/<\/font>/gi,'');
			new_html = new_html.replace('[','<span class="webring_url">[');
			new_html = new_html.replace(']',']</span>');
			new_html = new_html.replace(/<a href/gi,'<a class="webring_url" target="_ads" href');
			new_html = new_html.replace('Links By CategoryClicks','<div style="font-size:12.5px;">Links By CategoryClicks</div>');
			new_html = new_html.replace(/Click Here!/gi,'<span style="font-size:11px;">Click Here!</span>');
			new_html = new_html.replace('><b>Online',' align="center"><b>Online');

			// Update html
			obj.innerHTML = new_html;
		
			// Display it
			obj.style['display'] = 'block';
		};
	};
};
window.onload=styleWebring;