function animate(width)
{
	jQuery('#theMarquee ul').animate({'margin-left': (-1*width)}, 20000,function()
	{
		jQuery(this).css('margin-left', width);
		animate(width);
	});
	
}
jQuery(document).ready(function()
{
	if(jQuery('.ControlPanel').length > 0)
		jQuery('#topsection').css('overflow','');
		
	jQuery('div#navigation div span a img').remove();
	jQuery('#navigation table td table td + td').remove();
	jQuery('#nav2 #HouseMenuNavCurrentLink').parents('li').addClass('active');
	if(jQuery('.ControlPanel').length != 0)
	{
		jQuery('#topsection').css('height','280px');
		jQuery('#main').css('padding-top','280px');
	}
	jQuery('.nonSelActive').parent('a').addClass('active').parent().parent().parent().parent().addClass('active');
	
	//MARQUEE ROTATOR FOR HOME PAGE
	if(jQuery('#theMarquee').length > 0 )
	{
		var width = jQuery('#theMarquee').width();
		jQuery('#theMarquee').css('overflow','hidden').find('ul').css('width',width+'px');
		animate(width);
	}
});
function getQuery(whole)
{
	var quer = location.href.match(/\?(.*)/);

	if(quer != null && (quer+'').length > 2 && (quer+'').indexOf('=') != -1)
	{
		quer[1] = unescape(quer[1]).replace(/'/g, "\\\'");
		var query = "({'"+quer[1].replace(/=/g, "':'").replace(/&/g, "','")+"','list':[['"+quer[1].replace(/=/g, "','").replace(/&/g, "'],['")+"']]})";
		return ((whole != null)? quer[1]: eval(query));
	} else {
		return '';
	}
}
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toUTCString())+';path=/;';
}

           

