﻿//////
//---------------------------TRANSPARENT IMAGE----------------------------------------//
////////
//Array containing all PNG images on the page
			var PNGimageArray = new Array();
			var isPrinting = false;

			//Path to the blank image (1x1 transparent)
			var blankSrc = "image/blank.gif";

			//Captures print events
			window.attachEvent("onbeforeprint", function () { beforePrint(); } );
			window.attachEvent("onafterprint", function () { afterPrint(); } );                               
			                                                      
			//Tests if element is a PNG image, and if so fixes it
			function addPngImage(element){
				if (/\.png$/i.test(element.src)) {
					fixImage(element);
					element.attachEvent("onpropertychange", function () { propertyChanged(); } );
					PNGimageArray[PNGimageArray.length] = element;
				}
			}
			//Applies filter and changes source to blank
			function fixImage(element) {
				element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + element.src + "')";
				element.src = blankSrc;
			}
function propertyChanged() {
				if (isPrinting) return;
				var element = event.srcElement;
				var pName = event.propertyName;
				if (pName != "src") return;
				if (!new RegExp(blankSrc).test(element.src))
					fixImage(element);

			}

			//Turns image back to original before print (Explorer can't print filters)
			function beforePrint() {
				isPrinting = true;
				var element;
				for(var i = 0; i < PNGimageArray.length; i++){
					element = PNGimageArray[i];
					element.src = element.filters[0].src;
					element.runtimeStyle.filter = "";
				}

			}

			//Fixes image after print
			function afterPrint() {
				isPrinting = false;
				var element;
				for(var i = 0; i < PNGimageArray.length; i++){
					element = PNGimageArray[i];
					fixImage(element);

				}
			}
////////
//--------------------------------------------------TRANSPARENT IMAGE----------------------------//
////////


//////////
//---------------------------------------------------SKIN CHOOSER----------------//
//////////
//Animated Collapsible DIV- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated June 27th, 07'. Added ability for a DIV to be initially expanded.

var uniquepageid=window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, "") //get current page path and name, used to uniquely identify this page for persistence feature

function animatedcollapse(divId, animatetime, persistexpand, initstate){
	this.divId=divId
	this.divObj=document.getElementById(divId)
	this.divObj.style.overflow="hidden"
	this.timelength=animatetime
	this.initstate=(typeof initstate!="undefined" && initstate=="block")? "block" : "contract"
	this.isExpanded=animatedcollapse.getCookie(uniquepageid+"-"+divId) //"yes" or "no", based on cookie value
	this.contentheight=parseInt(this.divObj.style.height)
	var thisobj=this
	if (isNaN(this.contentheight)){ //if no CSS "height" attribute explicitly defined, get DIV's height on window.load
		animatedcollapse.dotask(window, function(){thisobj._getheight(persistexpand)}, "load")
		if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
			this.divObj.style.visibility="hidden" //hide content (versus collapse) until we can get its height
	}
	else if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
		this.divObj.style.height=0 //just collapse content if CSS "height" attribute available
	if (persistexpand)
		animatedcollapse.dotask(window, function(){animatedcollapse.setCookie(uniquepageid+"-"+thisobj.divId, thisobj.isExpanded)}, "unload")
}

animatedcollapse.prototype._getheight=function(persistexpand){
	this.contentheight=this.divObj.offsetHeight
	if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes"){ //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
		this.divObj.style.height=0 //collapse content
		this.divObj.style.visibility="visible"
	}
	else //else if persistence is enabled AND this content should be expanded, define its CSS height value so slideup() has something to work with
		this.divObj.style.height=this.contentheight+"px"
}


animatedcollapse.prototype._slideengine=function(direction){
	var elapsed=new Date().getTime()-this.startTime //get time animation has run
	var thisobj=this
	if (elapsed<this.timelength){ //if time run is less than specified length
		var distancepercent=(direction=="down")? animatedcollapse.curveincrement(elapsed/this.timelength) : 1-animatedcollapse.curveincrement(elapsed/this.timelength)
	this.divObj.style.height=distancepercent * this.contentheight +"px"
	this.runtimer=setTimeout(function(){thisobj._slideengine(direction)}, 10)
	}
	else{ //if animation finished
		this.divObj.style.height=(direction=="down")? this.contentheight+"px" : 0
		this.isExpanded=(direction=="down")? "yes" : "no" //remember whether content is expanded or not
		this.runtimer=null
	}
}


animatedcollapse.prototype.slidedown=function(){
	if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
		if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
			alert("Please wait until document has fully loaded then click again")
		else if (parseInt(this.divObj.style.height)==0){ //if content is collapsed
			this.startTime=new Date().getTime() //Set animation start time
			this._slideengine("down")
		}
	}
}

animatedcollapse.prototype.slideup=function(){
	if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
		if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
			alert("Please wait until document has fully loaded then click again")
		else if (parseInt(this.divObj.style.height)==this.contentheight){ //if content is expanded
			this.startTime=new Date().getTime()
			this._slideengine("up")
		}
	}
}

animatedcollapse.prototype.slideit=function(){
	if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
		alert("Please wait until document has fully loaded then click again")
	else if (parseInt(this.divObj.style.height)==0)
		this.slidedown()
	else if (parseInt(this.divObj.style.height)==this.contentheight)
		this.slideup()
}

// -------------------------------------------------------------------
// A few utility functions below:
// -------------------------------------------------------------------

animatedcollapse.curveincrement=function(percent){
	return (1-Math.cos(percent*Math.PI)) / 2 //return cos curve based value from a percentage input
}


animatedcollapse.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
	var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false)
	else if (target.attachEvent)
		target.attachEvent(tasktype, functionref)
}

animatedcollapse.getCookie=function(Name){ 
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return ""
}

animatedcollapse.setCookie=function(name, value, days){
	if (typeof days!="undefined"){ //if set persistent cookie
		var expireDate = new Date()
		var expstring=expireDate.setDate(expireDate.getDate()+days)
		document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()
	}
	else //else if this is a session only cookie
		document.cookie = name+"="+value
}

///////////
//-------------------------------------------SKIN CHOOSER------------------------------------//
/////////////


/////////////
//------------------------------------------------STYLE SWITCHER-------------------------------------//
////////////////
function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

window.onload = function(e) {
  var cookie = readCookie("style");
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);
}

window.onunload = function(e) {
  var title = getActiveStyleSheet();
  createCookie("style", title, 365);
}

var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
/////////////////
////-------------------------------------------STYLE SWITCHER-------------------------------------//
//////////////////

/////////////////
//-------------------------------------------------TABCONTENT------------------------------------//
/////////////////
//** Tab Content script- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
//** Last updated: Nov 8th, 06

var enabletabpersistence=1 //enable tab persistence via session only cookies, so selected tab is remembered?

////NO NEED TO EDIT BELOW////////////////////////
var tabcontentIDs=new Object()

function expandcontent(linkobj){
var ulid=linkobj.parentNode.parentNode.id //id of UL element
var ullist=document.getElementById(ulid).getElementsByTagName("li") //get list of LIs corresponding to the tab contents
for (var i=0; i<ullist.length; i++){
ullist[i].className=""  //deselect all tabs
if (typeof tabcontentIDs[ulid][i]!="undefined") //if tab content within this array index exists (exception: More tabs than there are tab contents)
document.getElementById(tabcontentIDs[ulid][i]).style.display="none" //hide all tab contents
}
linkobj.parentNode.className="selected"  //highlight currently clicked on tab
document.getElementById(linkobj.getAttribute("rel")).style.display="block" //expand corresponding tab content
saveselectedtabcontentid(ulid, linkobj.getAttribute("rel"))
}

function expandtab(tabcontentid, tabnumber){ //interface for selecting a tab (plus expand corresponding content)
var thetab=document.getElementById(tabcontentid).getElementsByTagName("a")[tabnumber]
if (thetab.getAttribute("rel"))
expandcontent(thetab)
}

function savetabcontentids(ulid, relattribute){// save ids of tab content divs
if (typeof tabcontentIDs[ulid]=="undefined") //if this array doesn't exist yet
tabcontentIDs[ulid]=new Array()
tabcontentIDs[ulid][tabcontentIDs[ulid].length]=relattribute
}

function saveselectedtabcontentid(ulid, selectedtabid){ //set id of clicked on tab as selected tab id & enter into cookie
if (enabletabpersistence==1) //if persistence feature turned on
setCookie(ulid, selectedtabid)
}

function getullistlinkbyId(ulid, tabcontentid){ //returns a tab link based on the ID of the associated tab content
var ullist=document.getElementById(ulid).getElementsByTagName("li")
for (var i=0; i<ullist.length; i++){
if (ullist[i].getElementsByTagName("a")[0].getAttribute("rel")==tabcontentid){
return ullist[i].getElementsByTagName("a")[0]
break
}
}
}

function initializetabcontent(){
for (var i=0; i<arguments.length; i++){ //loop through passed UL ids
if (enabletabpersistence==0 && getCookie(arguments[i])!="") //clean up cookie if persist=off
setCookie(arguments[i], "")
var clickedontab=getCookie(arguments[i]) //retrieve ID of last clicked on tab from cookie, if any
var ulobj=document.getElementById(arguments[i])
var ulist=ulobj.getElementsByTagName("li") //array containing the LI elements within UL
for (var x=0; x<ulist.length; x++){ //loop through each LI element
var ulistlink=ulist[x].getElementsByTagName("a")[0]
if (ulistlink.getAttribute("rel")){
savetabcontentids(arguments[i], ulistlink.getAttribute("rel")) //save id of each tab content as loop runs
ulistlink.onclick=function(){
expandcontent(this)
return false
}
if (ulist[x].className=="selected" && clickedontab=="") //if a tab is set to be selected by default
expandcontent(ulistlink) //auto load currenly selected tab content
}
} //end inner for loop
if (clickedontab!=""){ //if a tab has been previously clicked on per the cookie value
var culistlink=getullistlinkbyId(arguments[i], clickedontab)
if (typeof culistlink!="undefined") //if match found between tabcontent id and rel attribute value
expandcontent(culistlink) //auto load currenly selected tab content
else //else if no match found between tabcontent id and rel attribute value (cookie mis-association)
expandcontent(ulist[0].getElementsByTagName("a")[0]) //just auto load first tab instead
}
} //end outer for loop
}


function getCookie(Name){ 
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}

function setCookie(name, value){
document.cookie = name+"="+value //cookie value is domain wide (path=/)
}
//////////////////
//------------------------------------------------TABCONTENT----------------------------------//
//////////////////

/////////////////
//-----------------------------------------------LOADING AJAX TAB--------------------------------//
//////////////////


//var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
//var loadstatustext="<img src='image/loading.gif' /> Requesting content..."
//var enabletabpersistence=1 //enable tab persistence via session only cookies, so selected tab is remembered (1=yes, 0=no)?
//var loadedobjects=""
//var defaultcontentarray=new Object()
//var bustcacheparameter=""
//function ajaxpage(url, containerid, targetobj){
//var page_request = false
//if (window.XMLHttpRequest) // if Mozilla, IE7, Safari etc
//page_request = new XMLHttpRequest()
//else if (window.ActiveXObject){ // if IE
//try {
//page_request = new ActiveXObject("Msxml2.XMLHTTP")
//} 
//catch (e){
//try{
//page_request = new ActiveXObject("Microsoft.XMLHTTP")
//}
//catch (e){}
//}
//}
//else
//return false
//var ullist=targetobj.parentNode.parentNode.getElementsByTagName("li")
//for (var i=0; i<ullist.length; i++)
//ullist[i].className=""  //deselect all tabs
//targetobj.parentNode.className="selected"  //highlight currently clicked on tab
//if (url.indexOf("#default")!=-1){ //if simply show default content within container (verus fetch it via ajax)
//document.getElementById(containerid).innerHTML=defaultcontentarray[containerid]
//return
//}
//document.getElementById(containerid).innerHTML=loadstatustext
//page_request.onreadystatechange=function(){
//loadpage(page_request, containerid)
//}
//if (bustcachevar) //if bust caching of external page
//bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
//page_request.open('GET', url+bustcacheparameter, true)
//page_request.send(null)
//}
//function loadpage(page_request, containerid){
//if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
//document.getElementById(containerid).innerHTML=page_request.responseText
//}
//function loadobjs(revattribute){
//if (revattribute!=null && revattribute!=""){ //if "rev" attribute is defined (load external .js or .css files)
//var objectlist=revattribute.split(/\s*,\s*/) //split the files and store as array
//for (var i=0; i<objectlist.length; i++){
//var file=objectlist[i]
//var fileref=""
//if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
//if (file.indexOf(".js")!=-1){ //If object is a js file
//fileref=document.createElement('script')
//fileref.setAttribute("type","text/javascript");
//fileref.setAttribute("src", file);
//}
//else if (file.indexOf(".css")!=-1){ //If object is a css file
//fileref=document.createElement("link")
//fileref.setAttribute("rel", "stylesheet");
//fileref.setAttribute("type", "text/css");
//fileref.setAttribute("href", file);
//}
//}
//if (fileref!=""){
//document.getElementsByTagName("head").item(0).appendChild(fileref)
//loadedobjects+=file+" " //Remember this object as being already added to page
//}
//}
//}
//}
//
//function expandtab(tabcontentid, tabnumber){ //interface for selecting a tab (plus expand corresponding content)
//var thetab=document.getElementById(tabcontentid).getElementsByTagName("a")[tabnumber]
//if (thetab.getAttribute("rel")){
//ajaxpage(thetab.getAttribute("href"), thetab.getAttribute("rel"), thetab)
//loadobjs(thetab.getAttribute("rev"))
//}
//}
//
//function savedefaultcontent(contentid){// save default ajax tab content
//if (typeof defaultcontentarray[contentid]=="undefined") //if default content hasn't already been saved
//defaultcontentarray[contentid]=document.getElementById(contentid).innerHTML
//}
//
//function startajaxtabs(){
//for (var i=0; i<arguments.length; i++){ //loop through passed UL ids
//var ulobj=document.getElementById(arguments[i])
//var ulist=ulobj.getElementsByTagName("li") //array containing the LI elements within UL
//var persisttabindex=(enabletabpersistence==1)? parseInt(getCookie(arguments[i])) : "" //get index of persisted tab (if applicable)
//var isvalidpersist=(persisttabindex<ulist.length)? true : false //check if persisted tab index falls within range of defined tabs
//for (var x=0; x<ulist.length; x++){ //loop through each LI element
//var ulistlink=ulist[x].getElementsByTagName("a")[0]
//ulistlink.index=x
//if (ulistlink.getAttribute("rel")){
//var modifiedurl=ulistlink.getAttribute("href").replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")
//ulistlink.setAttribute("href", modifiedurl) //replace URL's root domain with dynamic root domain, for ajax security sake
//savedefaultcontent(ulistlink.getAttribute("rel")) //save default ajax tab content
//ulistlink.onclick=function(){
//ajaxpage(this.getAttribute("href"), this.getAttribute("rel"), this)
//loadobjs(this.getAttribute("rev"))
//saveselectedtabindex(this.parentNode.parentNode.id, this.index)
//return false
//}
//if ((enabletabpersistence==1 && persisttabindex<ulist.length && x==persisttabindex) || (enabletabpersistence==0 && ulist[x].className=="selected")){
//ajaxpage(ulistlink.getAttribute("href"), ulistlink.getAttribute("rel"), ulistlink) //auto load currenly selected tab content
//loadobjs(ulistlink.getAttribute("rev")) //auto load any accompanying .js and .css files
//}
//}
//}
//}
//}
//
//////////////Persistence related functions//////////////////////////
//
//function saveselectedtabindex(ulid, index){ //remember currently selected tab (based on order relative to other tabs)
//if (enabletabpersistence==1) //if persistence feature turned on
//setCookie(ulid, index)
//}
//
//function getCookie(Name){ 
//var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
//if (document.cookie.match(re)) //if cookie found
//return document.cookie.match(re)[0].split("=")[1] //return its value
//return ""
//}
//
//function setCookie(name, value){
//document.cookie = name+"="+value //cookie value is domain wide (path=/)
//}


//////////////////
//-------------------------------------------LOADING AJAX DIV---------------------------------------//
//////////////////


/////////////////////
///---------------------------------------------ANIMATED COLLAPSE------------------------------------//
///////////
//Animated Collapsible DIV- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated June 27th, 07'. Added ability for a DIV to be initially expanded.

var uniquepageid=window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, "") //get current page path and name, used to uniquely identify this page for persistence feature

function animatedcollapse(divId, animatetime, persistexpand, initstate){
	this.divId=divId
	this.divObj=document.getElementById(divId)
	this.divObj.style.overflow="hidden"
	this.timelength=animatetime
	this.initstate=(typeof initstate!="undefined" && initstate=="block")? "block" : "contract"
	this.isExpanded=animatedcollapse.getCookie(uniquepageid+"-"+divId) //"yes" or "no", based on cookie value
	this.contentheight=parseInt(this.divObj.style.height)
	var thisobj=this
	if (isNaN(this.contentheight)){ //if no CSS "height" attribute explicitly defined, get DIV's height on window.load
		animatedcollapse.dotask(window, function(){thisobj._getheight(persistexpand)}, "load")
		if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
			this.divObj.style.visibility="hidden" //hide content (versus collapse) until we can get its height
	}
	else if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes") //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
		this.divObj.style.height=0 //just collapse content if CSS "height" attribute available
	if (persistexpand)
		animatedcollapse.dotask(window, function(){animatedcollapse.setCookie(uniquepageid+"-"+thisobj.divId, thisobj.isExpanded)}, "unload")
}

animatedcollapse.prototype._getheight=function(persistexpand){
	this.contentheight=this.divObj.offsetHeight
	if (!persistexpand && this.initstate=="contract" || persistexpand && this.isExpanded!="yes"){ //Hide DIV (unless div should be expanded by default, OR persistence is enabled and this DIV should be expanded)
		this.divObj.style.height=0 //collapse content
		this.divObj.style.visibility="visible"
	}
	else //else if persistence is enabled AND this content should be expanded, define its CSS height value so slideup() has something to work with
		this.divObj.style.height=this.contentheight+"px"
}


animatedcollapse.prototype._slideengine=function(direction){
	var elapsed=new Date().getTime()-this.startTime //get time animation has run
	var thisobj=this
	if (elapsed<this.timelength){ //if time run is less than specified length
		var distancepercent=(direction=="down")? animatedcollapse.curveincrement(elapsed/this.timelength) : 1-animatedcollapse.curveincrement(elapsed/this.timelength)
	this.divObj.style.height=distancepercent * this.contentheight +"px"
	this.runtimer=setTimeout(function(){thisobj._slideengine(direction)}, 10)
	}
	else{ //if animation finished
		this.divObj.style.height=(direction=="down")? this.contentheight+"px" : 0
		this.isExpanded=(direction=="down")? "yes" : "no" //remember whether content is expanded or not
		this.runtimer=null
	}
}


animatedcollapse.prototype.slidedown=function(){
	if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
		if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
			alert("Please wait until document has fully loaded then click again")
		else if (parseInt(this.divObj.style.height)==0){ //if content is collapsed
			this.startTime=new Date().getTime() //Set animation start time
			this._slideengine("down")
		}
	}
}

animatedcollapse.prototype.slideup=function(){
	if (typeof this.runtimer=="undefined" || this.runtimer==null){ //if animation isn't already running or has stopped running
		if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
			alert("Please wait until document has fully loaded then click again")
		else if (parseInt(this.divObj.style.height)==this.contentheight){ //if content is expanded
			this.startTime=new Date().getTime()
			this._slideengine("up")
		}
	}
}

animatedcollapse.prototype.slideit=function(){
	if (isNaN(this.contentheight)) //if content height not available yet (until window.onload)
		alert("Please wait until document has fully loaded then click again")
	else if (parseInt(this.divObj.style.height)==0)
		this.slidedown()
	else if (parseInt(this.divObj.style.height)==this.contentheight)
		this.slideup()
}

// -------------------------------------------------------------------
// A few utility functions below:
// -------------------------------------------------------------------

animatedcollapse.curveincrement=function(percent){
	return (1-Math.cos(percent*Math.PI)) / 2 //return cos curve based value from a percentage input
}


animatedcollapse.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
	var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false)
	else if (target.attachEvent)
		target.attachEvent(tasktype, functionref)
}

animatedcollapse.getCookie=function(Name){ 
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return ""
}

animatedcollapse.setCookie=function(name, value, days){
	if (typeof days!="undefined"){ //if set persistent cookie
		var expireDate = new Date()
		var expstring=expireDate.setDate(expireDate.getDate()+days)
		document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()
	}
	else //else if this is a session only cookie
		document.cookie = name+"="+value
}
/////////////////////
/////--------------------------------------------------ANIMATED COLLAPSE-------------------------------//
////////////////////

///////////////////
//--------------------------------------------------CATCH THE PARTNER------------------------------------------//
////////////////////
//Translucent scroller- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
function partner(get)
{
var scroller_width='307px'
var scroller_height='168px'
var bgcolor=' #ffffff'
//var background='image\bgtop.jpg'
var pause=7000 //SET PAUSE BETWEEN SLIDE (3000=20 seconds)

var scrollercontent=new Array()
//Define scroller contents. Extend or contract array as needed

scrollercontent[0]='We are one of the <font color="#1c3a62"><strong>biggest international trade wholesalers</strong> of <font color="#1c3a62"><strong>China</strong>,we can offer you <font color="#1c3a62"><strong>laptop, Digital cameras, videos, GPS, cell phone, mp4, game console</strong>......<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#1c3a62"><strong>Beijing ZhongGuanChun<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Commercial and Trade Limited<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Chao Yang District Beijing CHINA</strong>'
scrollercontent[1]='Hi I am Looking forword for <font color="#1c3a62"><strong>40 Lakhs </strong>from an Investor,<br> <font color="#1c3a62"><strong>Vamsi Krishna<br>(Footware Development Company)<br> Hyderabad, INDIA</strong>'
scrollercontent[2]='I want finance venture for <font color="#1c3a62"><strong>IT</strong> based business-<font color="#1c3a62"><strong> Hemal, INDIA</strong>'
scrollercontent[3]='I am into direct marketing of <font color="#1c3a62"><strong>Diamond</strong> & want a business partner in <font color="#1c3a62"><strong>chennai</strong>-<br><font color="#1c3a62"><strong><Jaya Vishwanathan <br>vishakapatnam, INDIA</strong>'
scrollercontent[4]='I want a <font color="#1c3a62"><strong>female</strong> businesspartner who is experianced in beautician work and money required please contact for solid business opportunity-<br><font color="#1c3a62"><strong>Amit Malhotra<br>Delhi, INDIA </strong>'
scrollercontent[5]='I have experiance of <font color="#1c3a62"><strong>3 years as an ANCOR</strong>. I have diffrent type shows, I have also got an award for the <font color="#1c3a62"><strong>most confident girl</strong> as an anchor for<font color="#1c3a62"><strong> CNBC</strong> channel by <font color="#1c3a62"><strong>Tanuja Chandra- Writer-Director, Films</strong> and <font color="#1c3a62"><strong>Sushmita Sen- Actress</strong>. Please give me an opportunity to prove myself-<br><font color="#1c3a62"><strong>Zahra Rahmani, INDIA</strong>'
////NO need to edit beyond here/////////////

var ie4=document.all
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1

if (ie4||dom)
document.write('<div style="position:relative;width:'+scroller_width+';height:'+scroller_height+';overflow:hidden"><div id="canvas0" style="position:absolute;background-color:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div><div id="canvas1" style="position:absolute;background-color:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>')
else if (document.layers){
document.write('<ilayer id=tickernsmain visibility=hide width='+scroller_width+' height='+scroller_height+' bgColor='+bgcolor+'><layer id=tickernssub width='+scroller_width+' height='+scroller_height+' left=0 top=0>'+scrollercontent[0]+'</layer></ilayer>')
}

var curpos=scroller_height*(1)
var degree=10
var curcanvas="canvas0"
var curindex=0
var nextindex=1

function moveslide(){
if (curpos>0){
curpos=Math.max(curpos-degree,0)
tempobj.style.top=curpos+"px"
}
else{
clearInterval(dropslide)
if (crossobj.filters)
crossobj.filters.alpha.opacity=100
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=1
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
tempobj.innerHTML=scrollercontent[curindex]
nextindex=(nextindex<scrollercontent.length-1)? nextindex+1 : 0
setTimeout("rotateslide()",pause)
}
}

function rotateslide(){
if (ie4||dom){
resetit(curcanvas)
crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.style.zIndex++
if (crossobj.filters)
document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20
else if (crossobj.style.MozOpacity)
document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas1").style.MozOpacity=0.2
var temp='setInterval("moveslide()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else if (document.layers){
crossobj.document.write(scrollercontent[curindex])
crossobj.document.close()
}
curindex=(curindex<scrollercontent.length-1)? curindex+1 : 0
}

function resetit(what){
curpos=parseInt(scroller_height)*(1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.top=curpos+"px"
}

function startit(){
crossobj=ie4? eval("document.all."+curcanvas) : dom? document.getElementById(curcanvas) : document.tickernsmain.document.tickernssub
if (ie4||dom){
crossobj.innerHTML=scrollercontent[curindex]
rotateslide()
}
else{
document.tickernsmain.visibility='show'
curindex++
setInterval("rotateslide()",pause)
}
}

if (ie4||dom||document.layers)
window.onload=startit

}
/////////////////
//-------------------------------------------CATCH THE PARTNER--------------------------------------------//
//////////////////