<!--
////////////////////// OPEN WIN POP UP //////////////////////
function openwin(url, name, options) {
	var win = window.open(url, name, options);
}

////////////////////// GAME POP UP//////////////////////
function gamePop(url, name, width, height, resizable, scrollbars) {
	var str = "height=" + height + ",innerHeight=" + height;
	str += ",width=" + width + ",innerWidth=" + width;
	str += ",resizable=" + resizable + ",scrollbars=" + scrollbars;
	if(window.screen){
		var ah = screen.availHeight - 0;
		var aw = screen.availWidth - 0;
		var xc = (aw - width) / 2;
		var yc = (ah - height) / 2;
		str += ",left=" + xc + ",screenX=" + xc;
		str += ",top=" + yc + ",screenY=" + yc;
	}
	var win =  window.open(url, name, str);
	if(window.focus){
		win.focus()
	}
}
////////////////////// LEFT POP UP//////////////////////
function leftPop(url, name, width, height, resizable, scrollbars) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  str += ",resizable=" + resizable + ",scrollbars=" + scrollbars;
  if (window.screen) {
    //var ah = screen.availHeight - 0;
    var aw = screen.availWidth - 0;

    var xc = (aw - width);
    //var yc = (ah - height) / 2;
    var yc = 0;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  var win =  window.open(url, name, str);
  if (window.focus) {win.focus()}
}
////////////////////// HORSE RACING POP UP //////////////////////
function horsepop() {
	msgWindow=window.open("http://www.horsebook.com/horsepop.html","horseracing","toolbar=no,width=640,height=613,directories=no,status=no,scrollbars=auto,resize=no,menubar=no");
} 

////////////////////// FIND CID POP UP //////////////////////
function opencid(){
	window.open('/info/findcid.html','cid','width=225,height=175,scrollbars:no,resize:no');
}

////////////////////// DREAMWEAVER SCRIPTS //////////////////////
function MM_swapImgRestore(){ //v3.0
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages(){ //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


////////////////////// EXPANDABLE ITEM SCRIPTS //////////////////////
if (document.getElementById){
	document.write('<style type="text/css">\n')
	document.write('.sub{display: none;}\n ')
	document.write('</style>\n')
}

function Expand(obj){
	if(document.getElementById){
		var el = document.getElementById(obj);
		var ar = document.getElementById("expDiv").getElementsByTagName("span");
		if(el.style.display != "block"){
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="sub")
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

//Use this Code for expandable Terms and Conditions

function SwitchMenu(obj){
	if(document.getElementById){
		var el = document.getElementById(obj);
		var ar = document.getElementById("expDiv").getElementsByTagName("div");
		var ex = document.getElementById("ex"+(obj));
		if(el.style.display != "block"){
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="sub")
				ar[i].style.display = "none";
				ex.value = "[+]";
			}
			el.style.display = "block";
			document.getElementById("ex"+(obj)).value = "[—]";
		}else{
			el.style.display = "none";
			document.getElementById("ex"+(obj)).value = "[+]";
		}
	}
}

//////Email Validation/////////
function emailCheck(emailStr){
	var checkTLD=1;
	var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
	var emailPat=/^(.+)@(.+)$/;
	var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]";
	var quotedUser="(\"[^\"]*\")";
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	var atom=validChars + '+';
	var word="(" + atom + "|" + quotedUser + ")";
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
	var matchArray=emailStr.match(emailPat);
	
	if (matchArray==null){
		alert("Email address seems incorrect (check @ and .'s)");
		return false;
	}
	
	var user=matchArray[1];
	var domain=matchArray[2];
	
	for (i=0; i<user.length; i++){
		if (user.charCodeAt(i)>127){
			alert("This username contains invalid characters.");
			return false;
	   }
	}
	
	for (i=0; i<domain.length; i++){
		if (domain.charCodeAt(i)>127){
			alert("This domain name contains invalid characters.");
			return false;
		}
	}
	
	if (user.match(userPat)==null){
		alert("The username doesn't seem to be valid.");
		return false;
	}
	
	var IPArray=domain.match(ipDomainPat);
	
	if (IPArray!=null) {
		for (var i=1;i<=4;i++){
			if (IPArray[i]>255){
				alert("Destination IP address is invalid!");
				return false;
			}
		}
		return true;
	}
	
	var atomPat=new RegExp("^" + atom + "$");
	var domArr=domain.split(".");
	var len=domArr.length;
	
	for (i=0;i<len;i++) {
		if (domArr[i].search(atomPat)==-1){
			alert("The domain name does not seem to be valid.");
			return false;
	   }
	}
	
	if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1){
		alert("The address must end in a well-known domain or two letter " + "country.");
		return false;
	}
	
	if (len<2) {
		alert("This address is missing a hostname!");
		return false;
	}
	
	return true;
}

//////EXPANDABLE MENU/////////

function pageHeight(){
	var y;
	if (self.innerHeight){ // all except Explorer
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode
		y = document.documentElement.clientHeight;
	}
	else if (document.body){ // other Explorers
		y = document.body.clientHeight;
	}
	return y;
}

function pageWidth(){
	var x;
	if (self.innerWidth){ // all except Explorer
		x = self.innerWidth;
	}else if(document.documentElement && document.documentElement.clientWidth){ // Explorer 6 Strict Mode
		x = document.documentElement.clientWidth;
	}else if(document.body){ // other Explorers
		x = document.body.clientWidth;
	}
	return x;
}

function findLeft(obj) {
	var layer = document.getElementById(obj);
	var curleft = 0;
	if (layer.offsetParent) {
		curleft = layer.offsetLeft;
		while (layer = layer.offsetParent) {
			curleft += layer.offsetLeft;
		}
	}
	return curleft;
}

function findTop(obj) {
	var layer = document.getElementById(obj);
	var curltop = 0;
	if (layer.offsetParent) {
		curltop = layer.offsetTop;
		while (layer = layer.offsetParent) {
			curltop += layer.offsetTop;
		}
	}
	return curltop;
}


function pageHeight(){
	var y;
	if (self.innerHeight){ // all except Explorer
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode
		y = document.documentElement.clientHeight;
	}
	else if (document.body){ // other Explorers
		y = document.body.clientHeight;
	}
	return y;
}

function pageWidth(){
	var x;
	if (self.innerWidth){ // all except Explorer
		x = self.innerWidth;
	}else if(document.documentElement && document.documentElement.clientWidth){ // Explorer 6 Strict Mode
		x = document.documentElement.clientWidth;
	}else if(document.body){ // other Explorers
		x = document.body.clientWidth;
	}
	return x;
}

function resizeLayers(){
	var menuDiv = document.getElementById('menuDiv');
	var menuHeight = menuDiv.offsetHeight;
	var menuPosition = findTop('menuDiv')+menuHeight;
	var pagina = pageHeight();
	var resize = pagina-menuPosition-3;
	document.getElementById('BETTING').height = resize ;
}

function findLeft(obj) {
	var layer = document.getElementById(obj);
	var curleft = 0;
	if (layer.offsetParent) {
		curleft = layer.offsetLeft;
		while (layer = layer.offsetParent) {
			curleft += layer.offsetLeft;
		}
	}
	return curleft;
}

function findTop(obj){
	var layer = document.getElementById(obj);
	var curltop = 0;
	if (layer.offsetParent) {
		curltop = layer.offsetTop;
		while (layer = layer.offsetParent) {
			curltop += layer.offsetTop;
		}
	}
	return curltop;
}

function groupShow(obj,pos){
	var tier1 = document.getElementById(obj);
	var boton = document.getElementById(pos);
	var widthBoton = boton.offsetWidth;
	var heightBoton = boton.offsetHeight;
	var anchoPag = pageWidth();
	var XposLayer = (findLeft(pos)+150);
	if(document.getElementById){
		if(anchoPag > XposLayer){
			tier1.style.left = findLeft(pos)+'px';
		}else{
			tier1.style.left = (findLeft(pos)-150+widthBoton)+'px';
		}
		tier1.style.visibility = 'visible';
		tier1.style.top = (findTop(pos)+heightBoton-1)+'px';
	}
}

function groupHide(obj){
	var tier1 = document.getElementById(obj);
	if(document.getElementById){
		tier1.style.visibility = 'hidden';
	}
}

function lineShow(obj,pos){
	var tier2 = document.getElementById(obj);
	var groupLayer = document.getElementById(pos);
	var tamGroup = groupLayer.offsetWidth;
	var anchoPag = pageWidth();
	var XposGroupLayer = (findLeft(pos)+150+152);
	if(document.getElementById){
		if(anchoPag > XposGroupLayer){
			tier2.style.left = 150+'px';
		}else{
			tier2.style.left = -140+'px';
		}
		tier2.style.top = (findTop(pos)-150)+'px';
		tier2.style.visibility = 'visible';
	}
}

function lineHide(obj){
	var tier2 = document.getElementById(obj);
	if(document.getElementById){
		tier2.style.visibility = 'hidden';
	}
}
/****************************************************************/

function showSubMenu(obj,pos){
	var tier2 = document.getElementById(obj);
	var groupLayer = document.getElementById(pos);
	var tamGroup = groupLayer.offsetWidth;
	var anchoPag = pageWidth();
	var XposGroupLayer = (findLeft(pos)+150+152);
	var parent = groupLayer.parentNode.getAttribute('id');
	var distParent = findTop(parent)
	var distPos = findTop(pos)
	
	if(document.getElementById){
		if(anchoPag > XposGroupLayer){
			tier2.style.left = 150+'px';
		}else{
			tier2.style.visibility = 'visible';
			tier2.style.left = -150+'px';
		}
		tier2.style.top = (distPos-distParent)+'px';
		tier2.style.visibility = 'visible';
	}
}

function hideSubMenu(obj){
	var tier2 = document.getElementById(obj);
	if(document.getElementById){
		tier2.style.visibility = 'hidden';
	}
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->

/***************************Terms and Conditions spry starts*********************************/
var Spry;
if (!Spry) Spry = {};
if (!Spry.Widget) Spry.Widget = {};

Spry.Widget.CollapsiblePanel = function(element, opts)
{
	this.init(element);

	Spry.Widget.CollapsiblePanel.setOptions(this, opts);

	this.attachBehaviors();
};

Spry.Widget.CollapsiblePanel.prototype.init = function(element)
{
	this.element = this.getElement(element);
	this.focusElement = null;
	this.hoverClass = "CollapsiblePanelTabHover";
	this.openClass = "CollapsiblePanelOpen";
	this.closedClass = "CollapsiblePanelClosed";
	this.focusedClass = "CollapsiblePanelFocused";
	this.enableAnimation = true;
	this.enableKeyboardNavigation = true;
	this.animator = null;
	this.hasFocus = false;
	this.contentIsOpen = true;
};

Spry.Widget.CollapsiblePanel.prototype.getElement = function(ele)
{
	if (ele && typeof ele == "string")
		return document.getElementById(ele);
	return ele;
};

Spry.Widget.CollapsiblePanel.prototype.addClassName = function(ele, className)
{
	if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1))
		return;
	ele.className += (ele.className ? " " : "") + className;
};

Spry.Widget.CollapsiblePanel.prototype.removeClassName = function(ele, className)
{
	if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1))
		return;
	ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), "");
};

Spry.Widget.CollapsiblePanel.prototype.hasClassName = function(ele, className)
{
	if (!ele || !className || !ele.className || ele.className.search(new RegExp("\\b" + className + "\\b")) == -1)
		return false;
	return true;
};

Spry.Widget.CollapsiblePanel.prototype.setDisplay = function(ele, display)
{
	if( ele )
		ele.style.display = display;
};

Spry.Widget.CollapsiblePanel.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
{
	if (!optionsObj)
		return;
	for (var optionName in optionsObj)
	{
		if (ignoreUndefinedProps && optionsObj[optionName] == undefined)
			continue;
		obj[optionName] = optionsObj[optionName];
	}
};

Spry.Widget.CollapsiblePanel.prototype.onTabMouseOver = function()
{
	this.addClassName(this.getTab(), this.hoverClass);
};

Spry.Widget.CollapsiblePanel.prototype.onTabMouseOut = function()
{
	this.removeClassName(this.getTab(), this.hoverClass);
};

Spry.Widget.CollapsiblePanel.prototype.open = function()
{
	this.contentIsOpen = true;
	if (this.enableAnimation)
	{
		if (this.animator)
			this.animator.stop();
		this.animator = new Spry.Widget.CollapsiblePanel.PanelAnimator(this, true);
		this.animator.start();
	}
	else
		this.setDisplay(this.getContent(), "block");

	this.removeClassName(this.element, this.closedClass);
	this.addClassName(this.element, this.openClass);
};

Spry.Widget.CollapsiblePanel.prototype.close = function()
{
	this.contentIsOpen = false;
	if (this.enableAnimation)
	{
		if (this.animator)
			this.animator.stop();
		this.animator = new Spry.Widget.CollapsiblePanel.PanelAnimator(this, false);
		this.animator.start();
	}
	else
		this.setDisplay(this.getContent(), "none");

	this.removeClassName(this.element, this.openClass);
	this.addClassName(this.element, this.closedClass);
};

Spry.Widget.CollapsiblePanel.prototype.onTabClick = function()
{
	if (this.isOpen())
		this.close();
	else
		this.open();
	this.focus();
};

Spry.Widget.CollapsiblePanel.prototype.onFocus = function(e)
{
	this.hasFocus = true;
	this.addClassName(this.element, this.focusedClass);
};

Spry.Widget.CollapsiblePanel.prototype.onBlur = function(e)
{
	this.hasFocus = false;
	this.removeClassName(this.element, this.focusedClass);
};

Spry.Widget.CollapsiblePanel.ENTER_KEY = 13;
Spry.Widget.CollapsiblePanel.SPACE_KEY = 32;

Spry.Widget.CollapsiblePanel.prototype.onKeyDown = function(e)
{
	var key = e.keyCode;
	if (!this.hasFocus || (key != Spry.Widget.CollapsiblePanel.ENTER_KEY && key != Spry.Widget.CollapsiblePanel.SPACE_KEY))
		return true;
	
	if (this.isOpen())
		this.close();
	else
		this.open();

	if (e.stopPropagation)
		e.stopPropagation();
	if (e.preventDefault)
		e.preventDefault();

	return false;
};

Spry.Widget.CollapsiblePanel.prototype.attachPanelHandlers = function()
{
	var tab = this.getTab();
	if (!tab)
		return;

	var self = this;
	Spry.Widget.CollapsiblePanel.addEventListener(tab, "click", function(e) { return self.onTabClick(); }, false);
	Spry.Widget.CollapsiblePanel.addEventListener(tab, "mouseover", function(e) { return self.onTabMouseOver(); }, false);
	Spry.Widget.CollapsiblePanel.addEventListener(tab, "mouseout", function(e) { return self.onTabMouseOut(); }, false);

	if (this.enableKeyboardNavigation)
	{
		// XXX: IE doesn't allow the setting of tabindex dynamically. This means we can't
		// rely on adding the tabindex attribute if it is missing to enable keyboard navigation
		// by default.

		// Find the first element within the tab container that has a tabindex or the first
		// anchor tag.
		
		var tabIndexEle = null;
		var tabAnchorEle = null;

		this.preorderTraversal(tab, function(node) {
			if (node.nodeType == 1 /* NODE.ELEMENT_NODE */)
			{
				var tabIndexAttr = tab.attributes.getNamedItem("tabindex");
				if (tabIndexAttr)
				{
					tabIndexEle = node;
					return true;
				}
				if (!tabAnchorEle && node.nodeName.toLowerCase() == "a")
					tabAnchorEle = node;
			}
			return false;
		});

		if (tabIndexEle)
			this.focusElement = tabIndexEle;
		else if (tabAnchorEle)
			this.focusElement = tabAnchorEle;

		if (this.focusElement)
		{
			Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "focus", function(e) { return self.onFocus(e); }, false);
			Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "blur", function(e) { return self.onBlur(e); }, false);
			Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "keydown", function(e) { return self.onKeyDown(e); }, false);
		}
	}
};

Spry.Widget.CollapsiblePanel.addEventListener = function(element, eventType, handler, capture)
{
	try
	{
		if (element.addEventListener)
			element.addEventListener(eventType, handler, capture);
		else if (element.attachEvent)
			element.attachEvent("on" + eventType, handler);
	}
	catch (e) {}
};

Spry.Widget.CollapsiblePanel.prototype.preorderTraversal = function(root, func)
{
	var stopTraversal = false;
	if (root)
	{
		stopTraversal = func(root);
		if (root.hasChildNodes())
		{
			var child = root.firstChild;
			while (!stopTraversal && child)
			{
				stopTraversal = this.preorderTraversal(child, func);
				try { child = child.nextSibling; } catch (e) { child = null; }
			}
		}
	}
	return stopTraversal;
};

Spry.Widget.CollapsiblePanel.prototype.attachBehaviors = function()
{
	var panel = this.element;
	var tab = this.getTab();
	var content = this.getContent();

	if (this.contentIsOpen || this.hasClassName(panel, this.openClass))
	{
		this.removeClassName(panel, this.closedClass);
		this.setDisplay(content, "block");
		this.contentIsOpen = true;
	}
	else
	{
		this.removeClassName(panel, this.openClass);
		this.addClassName(panel, this.closedClass);
		this.setDisplay(content, "none");
		this.contentIsOpen = false;
	}

	this.attachPanelHandlers();
};

Spry.Widget.CollapsiblePanel.prototype.getTab = function()
{
	return this.getElementChildren(this.element)[0];
};

Spry.Widget.CollapsiblePanel.prototype.getContent = function()
{
	return this.getElementChildren(this.element)[1];
};

Spry.Widget.CollapsiblePanel.prototype.isOpen = function()
{
	return this.contentIsOpen;
};

Spry.Widget.CollapsiblePanel.prototype.getElementChildren = function(element)
{
	var children = [];
	var child = element.firstChild;
	while (child)
	{
		if (child.nodeType == 1 /* Node.ELEMENT_NODE */)
			children.push(child);
		child = child.nextSibling;
	}
	return children;
};

Spry.Widget.CollapsiblePanel.prototype.focus = function()
{
	if (this.focusElement && this.focusElement.focus)
		this.focusElement.focus();
};

/////////////////////////////////////////////////////

Spry.Widget.CollapsiblePanel.PanelAnimator = function(panel, doOpen, opts)
{
	this.timer = null;
	this.interval = 0;
	this.stepCount = 0;

	this.fps = 0;
	this.steps = 10;
	this.duration = 500;
	this.onComplete = null;

	this.panel = panel;
	this.content = panel.getContent();
	this.panelData = [];
	this.doOpen = doOpen;

	Spry.Widget.CollapsiblePanel.setOptions(this, opts);


	// If caller specified speed in terms of frames per second,
	// convert them into steps.

	if (this.fps > 0)
	{
		this.interval = Math.floor(1000 / this.fps);
		this.steps = parseInt((this.duration + (this.interval - 1)) / this.interval);
	}
	else if (this.steps > 0)
		this.interval = this.duration / this.steps;

	var c = this.content;

	var curHeight = c.offsetHeight ? c.offsetHeight : 0;
	
	if (doOpen && c.style.display == "none")
		this.fromHeight = 0;
	else
		this.fromHeight = curHeight;

	if (!doOpen)
		this.toHeight = 0;
	else
	{
		if (c.style.display == "none")
		{
			// The content area is not displayed so in order to calculate the extent
			// of the content inside it, we have to set its display to block.

			c.style.visibility = "hidden";
			c.style.display = "block";
		}

		// Unfortunately in Mozilla/Firefox, fetching the offsetHeight seems to cause
		// the browser to synchronously re-layout and re-display content on the page,
		// so we see a brief flash of content that is *after* the panel being positioned
		// where it should when the panel is fully expanded. To get around this, we
		// temporarily position the content area of the panel absolutely off-screen.
		// This has the effect of taking the content out-of-flow, so nothing shifts around.

		// var oldPos = c.style.position;
		// var oldLeft = c.style.left;
		// c.style.position = "absolute";
		// c.style.left = "-2000em";

		// Clear the height property so we can calculate
		// the full height of the content we are going to show.
		c.style.height = "";
		this.toHeight = c.offsetHeight;

		// Now restore the position and offset to what it was!
		// c.style.position = oldPos;
		// c.style.left = oldLeft;
	}

	this.increment = (this.toHeight - this.fromHeight) / this.steps;
	this.overflow = c.style.overflow;

	c.style.height = this.fromHeight + "px";
	c.style.visibility = "visible";
	c.style.overflow = "hidden";
	c.style.display = "block";
};

Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.start = function()
{
	var self = this;
	this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval);
};

Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stop = function()
{
	if (this.timer)
	{
		clearTimeout(this.timer);

		// If we're killing the timer, restore the overflow
		// properties on the panels we were animating!

		if (this.stepCount < this.steps)
			this.content.style.overflow = this.overflow;
	}

	this.timer = null;
};

Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stepAnimation = function()
{
	++this.stepCount;

	this.animate();

	if (this.stepCount < this.steps)
		this.start();
	else if (this.onComplete)
		this.onComplete();
};

Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.animate = function()
{
	if (this.stepCount >= this.steps)
	{
		if (!this.doOpen)
			this.content.style.display = "none";
		this.content.style.overflow = this.overflow;
		this.content.style.height = this.toHeight + "px";
	}
	else
	{
		this.fromHeight += this.increment;
		this.content.style.height = this.fromHeight + "px";
	}
};
/***************************Terms and Conditions spry ends*********************************/
