/////////////////////////////////////////////
// Function - Deactivate
// Description - Replaces 'active' className with 'inactive'
// Arguements - None
/////////////////////////////////////////////

function Deactivate(elemTarget)
{
	var element;
	if (elemTarget === undefined)
	{
		element = this;
	}
	else
	{
		element = elemTarget;
	}

	var strClass = element.className.toString();
	if (strClass.indexOf('active') === -1)
	{
		if (strClass === '' || strClass === undefined || strClass === null)
		{
			element.className = strClass + 'inactive';
		}
		else
		{
			element.className = strClass + ' inactive';
		}
	}
	else
	{
		if (strClass.indexOf('inactive') === -1)
		{
			element.className = strClass.replace(/( *)active( *)/gi,'$1inactive$2');
		}
		else
		{
			element.className = strClass;

		}
	}
	element.status = false;
}

/////////////////////////////////////////////
// Function - Activate
// Description - Replaces 'inactive' className with 'active'
// Arguements - None
/////////////////////////////////////////////
function Activate(elemTarget)
{
	var element;
	if (elemTarget === undefined)
	{
		element = this;
	}
	else
	{
		element = elemTarget;
	}

	var strClass = element.className.toString();
	if (strClass.indexOf('active') === -1)
	{
		if (strClass === '' || strClass === undefined || strClass === null)
		{
			element.className = strClass + 'active';
		}
		else
		{
			element.className = strClass + ' active';
		}
	}
	else if (strClass.indexOf('inactive') > -1)
	{
		element.className = strClass.replace(/inactive/gi,'active');
	}
	element.status = true;
}


/////////////////////////////////////////////
// Function - LoadTab
// Description - Attached to LI, swaps in and out tab wells in DOM
// Arguements - None
/////////////////////////////////////////////
var floatTabAnimationTime = .15;
var intTabFrameRate = 45;

var intEaseOut = 100;

window.onkeypress = function(e)
{
	if (e.charCode == 115)
	{
		floatTabAnimationTime = 2;
		intTabFrameRate = 60;
	}
};

window.onkeyup = function(e)
{
	floatTabAnimationTime = .15;
	intTabFrameRate = 45;
};

function LoadTab()
{
	if (boolAccordionHover)
	{
		if (this.wellGroup !== undefined && this.wellGroup !== null)
		{

			tabs = document.getElementsByTagName('LI');
			for (tabKey = 0;tabKey < tabs.length;tabKey++)
			{
				if (tabs[tabKey].tabTitle !== undefined && tabs[tabKey].tabTitle !== null && tabs[tabKey].tabTitle !== '' && tabs[tabKey].tagName == 'LI' && this.wellGroup == tabs[tabKey].wellGroup && !this.status)
				{
					tabs[tabKey].rootWell.currentHeight = 0;
					tabs[tabKey].Deactivate();
				}
			}

			for (var wellKey=0;wellKey <this.wellGroup.length;wellKey++)
			{
				if (this.wellGroup[wellKey] && this.wellGroup[wellKey].id != this.tabTitle)
				{
					this.wellGroup[wellKey].Deactivate();
				}
			}

			this.wellGroup.innerHTML = this.wellGroup.originalWell;
			this.wellGroup.className = this.wellGroup.originalClass;

		}

		if(this.status === false)
		{
			this.Activate();
			this.rootWell.Activate();

			for (var wellKey=0;wellKey< this.wells.length;wellKey++)
			{
				if (this.wells[wellKey].id == this.tabTitle)
				{
					if (this.boolAnimate)
					{
						this.wells[wellKey].style.overflow = 'visible';
						this.wells[wellKey].style.height = '0px';

						if (this.rootTabs.className.indexOf('accordion') > -1)
						{
							this.rootWell.currentHeight = 0;
							addAction(this.wells[wellKey].id,'height',0,floatTabAnimationTime,this.rootWell.currentHeight,this.wells[wellKey].height,0,intEaseOut,intTabFrameRate);
						}
						else
						{
							addAction(this.wells[wellKey].id,'height',0,floatTabAnimationTime,this.rootWell.currentHeight,this.wells[wellKey].height,0,intEaseOut,intTabFrameRate);
						}

						if (this.rootWell.currentHeight === 0)
						{
						//	addAction(this.rootWell.id,'alpha',0,floatTabAnimationTime,0,100,0,intEaseOut,intTabFrameRate,20); // removed for performance
						}

						addScript("$('" + this.rootWell.id + "').style.height = null;$('" + this.wells[wellKey].id + "').Activate();",0);
						addScript("document.onselectstart = null;",floatTabAnimationTime);
						playTimeline();

						this.rootWell.currentHeight = this.wells[wellKey].height;
					}
					else
					{
						addScript(";$('" + this.wells[wellKey].id + "').Activate();",0); //remove flicker
						playTimeline();
					}
				}
				else if (this.rootTabs.className.indexOf('accordion') === -1)
				{
					addScript(";$('" + this.wells[wellKey].id + "').Deactivate();",0); //remove flicker
					playTimeline();


				}
				else if (this.rootTabs.className.indexOf('accordion') > -1)
				{
					if (this.wells[wellKey].status === true)
					{
						addAction(this.wells[wellKey].id,'height',0,floatTabAnimationTime,this.wells[wellKey].height,0,0,intEaseOut,intTabFrameRate);
						addScript("$('" + this.wells[wellKey].id + "').Deactivate();",floatTabAnimationTime);
						playTimeline();
					}
					this.rootWell.currentHeight = 0;

				}
			}

			for (var tabKey=0; tabKey<this.tabs.length;tabKey++)
			{
				if (this.tabs[tabKey].tabTitle == this.tabTitle)
				{
					this.tabs[tabKey].Activate();
				}
				else if (this.rootTabs.className.indexOf('accordion') === -1)
				{
					this.tabs[tabKey].Deactivate();
				}
				else if (this.rootTabs.className.indexOf('accordion') > -1)
				{
					this.tabs[tabKey].Deactivate();
				}
			}
		}
		else if (this.boolCollapsible)
		{
			if (!this.boolAnimate)
			{
				this.rootWell.Deactivate();
			}
			this.Deactivate();

			for (var wellKey=0;wellKey<this.wells.length;wellKey++)
			{
				if (this.wells[wellKey].id == this.tabTitle)
				{
					if (this.boolAnimate)
					{
						addAction(this.wells[wellKey].id,'height',0,floatTabAnimationTime + .05,this.wells[wellKey].height,0,0,intEaseOut,intTabFrameRate);
						addScript("$('" + this.rootWell.id + "').style.height = null;",0);
						addScript("$('" + this.wells[wellKey].id + "').Deactivate();$('" + this.rootWell.id + "').Deactivate();",floatTabAnimationTime);
						playTimeline();

						this.rootWell.currentHeight = 0;
					}
					else
					{
						this.wells[wellKey].Deactivate();
					}
				}
			}
		}
		this.blur();
		return false;
	}
}

var boolRoundCorners = false;
var boolAccordionHover = true;
var arrPageTabs = new Array();

/////////////////////////////////////////////
// Function - CreateTabs
// Description - Create tab group
// Arguements - (element) Tabs, (element) Well, (bool) Show well on init, (bool) Can collapse, (bool) Animated, (String) Start tab, (array - optional) Tab super group
/////////////////////////////////////////////

function CreateTabs(objTabs,objWells,boolStartState,boolCollapsible,boolAnimate,strDefaultTab,arrGroup)
{
	var tabKey = arrPageTabs.length;
	arrPageTabs[tabKey] = [];
	arrPageTabs[tabKey].tab = objTabs;
	arrPageTabs[tabKey].well = objWells;
	arrPageTabs[tabKey].start = boolStartState;
	arrPageTabs[tabKey].coll = boolCollapsible;
	arrPageTabs[tabKey].anim = boolAnimate;
	arrPageTabs[tabKey].def = strDefaultTab;
	arrPageTabs[tabKey].group = arrGroup;
}

window.onload = function()
{
	for(var i=0; i<arrPageTabs.length;i++)
	{
		ExecTab(arrPageTabs[i].tab,arrPageTabs[i].well,arrPageTabs[i].start,arrPageTabs[i].coll,arrPageTabs[i].anim,arrPageTabs[i].def,arrPageTabs[i].group);
	}
	
	if ($('menu'))
	{
		CreateDropDown($('menu'));
	}

	if ($('countrySelect'))
	{
		var myBoxObject = new CurvyCorners(tabWellAliased,$('countrySelect'));
		myBoxObject.applyCornersToAll();	
	}
	if ($('onlineContent'))
	{
		$('filterForm').style.height = $('onlineContent').clientHeight + 'px';
	}
	
	window.onresize();
}

/////////////////////////////////////////////
// Function - sifr
// Description - Create SIFR flash movies for heading classes
// Arguements - None
/////////////////////////////////////////////

function sifr()
{
	if(typeof sIFR == "function"){
		sIFR.replaceElement("h1.sifr", named({sFlashSrc: "/COLTImages/helveticaneuelight.swf", sColor: "#000", sWmode: "transparent"}));
		sIFR.replaceElement("h2.sifr", named({sFlashSrc: "/COLTImages/helveticaneuelight.swf", sColor: "#006D76", sWmode: "transparent"}));
	}
}

/////////////////////////////////////////////
// Function - BodyWidth
// Description - return frame dimentions
// Arguements - None
/////////////////////////////////////////////

function BodyWidth()
{
	if (self.innerWidth)
	{
		frameWidth = self.innerWidth;
		frameHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientWidth)
	{
		frameWidth = document.documentElement.clientWidth;
		frameHeight = document.documentElement.clientHeight;
	}
	else if (document.body)
	{
		frameWidth = document.body.clientWidth;
		frameHeight = document.body.clientHeight;
	}
		
	return [frameWidth,frameHeight];
}

window.onresize = function()
{
	if ($('countrySelect'))
	{
		$('countrySelect').style.right = (BodyWidth()[0] - 965) / 2 - 8 +  'px';
	}
	
	if ($('gallery'))
	{
		$('gallery').style.top = fetchScrollTop() + 300 + 'px';
	}
	
	if ($('rm'))
	{
		$('rm').style.top = fetchScrollTop() + 300 + 'px';
	}
	
	if ($('register'))
	{
		$('register').style.top = fetchScrollTop() + 300 + 'px';
	}
};

window.onscroll = function() {
	if ($('gallery'))
	{
		$('gallery').style.top = fetchScrollTop() + 300 + 'px';
	}
	if ($('rm'))
	{
		$('rm').style.top = fetchScrollTop() + 300 + 'px';
	}
	if ($('register'))
	{
		$('register').style.top = fetchScrollTop() + 300 + 'px';
	}
};


function hideSelect()

{	
	document.getElementById("switchLoginTarget").style.visibility='hidden';
}

function showSelect()

{	
	document.getElementById("switchLoginTarget").style.visibility='visible';
}

// hide select

function HideDropDownOnAPage() {
        // hide all dropdowns on the page
        
        // looping through all forms on the page
        for (f = 0; f < document.forms.length; f++)
        {
            var elements = document.forms[f].elements;
            // looping through all elements on certain form
            for (e = 0; e < elements.length; e++)
            {
                if (elements[e].type == "select-one")
                {
                    elements[e].style.display = 'none';
                }
            }
        }
}

// show select	

function ShowDropDownOnAPage() {
        // hide all dropdowns on the page
        for (f = 0; f < document.forms.length; f++)
        {
            var elements = document.forms[f].elements;
            for (e = 0; e < elements.length; e++)
            {
                if (elements[e].type == "select-one")
                {
                    elements[e].style.display = 'block';
                }
            }
        }
	}


/////////////////////////////////////////////
// Function - OpenLang
// Description - show country selection box
// Arguements - None
/////////////////////////////////////////////

var langTimeOut;

function OpenLang()
{
	if ($('countrySelect'))
	{
		$('countrySelect').onmouseout = function()
		{
			langTimeOut = setTimeout("$('countrySelect').onmouseout = null;CloseLang();",750);
		};
		
		$('countrySelect').onmouseover = function()
		{
			clearTimeout(langTimeOut);
		};
		
		var intLangTop = 0 - $('countrySelect').clientHeight - 8;
		$('countrySelect').style.top = intLangTop + 'px';

		addAction($('countrySelect').id,'top',0,.45,intLangTop,0,0,100,45);
		playTimeline();
		if ($('switchLoginTarget'))
		{
			hideSelect();
		}
	}
}

/////////////////////////////////////////////
// Function - OpenLang
// Description - hide in country selection box
// Arguements - None
/////////////////////////////////////////////

function CloseLang()
{
		addAction($('countrySelect').id,'top',0,.45,0,0 - $('countrySelect').clientHeight - 8,100,0,45);
		playTimeline();
		if ($('switchLoginTarget'))
		{
			showSelect();
		}
}

var tabWellUp = {
	tl: { radius: 7 },
	tr: { radius: 7 },
	bl: { radius: 4 },
	br: { radius: 4 },
	antiAlias: false,
	autoPad: true,
	validTags: ["div"]
}

var tabWell = {
	tl: { radius: 4 },
	tr: { radius: 4 },
	bl: { radius: 7 },
	br: { radius: 7 },
	antiAlias: false,
	autoPad: true,
	validTags: ["div"]
}

var tabWellAliased = {
	tl: { radius: 4 },
	tr: { radius: 4 },
	bl: { radius: 7 },
	br: { radius: 7 },
	antiAlias: false,
	autoPad: true,
	validTags: ["div"]
}

/////////////////////////////////////////////
// Function - ExecTab
// Description -
// Arguements - (element) Tabs, (element) Well, (bool) Show well on init, (bool) Can collapse, (bool) Animated, (String) Start tab, (array - optional) Tab super group
/////////////////////////////////////////////

function ExecTab(objTabs,objWells,boolStartState,boolCollapsible,boolAnimate,strDefaultTab,arrGroup)
{

	var arrTabs = [];
	var arrWells = [];
	var arrHeight = [];
	var intAccordianHeight = 0;

	// Register root well

	objWells.Activate = Activate;
	objWells.Deactivate = Deactivate;

	objWells.Activate();

	var myBoxObject ;
	if (objWells.className.indexOf('tabWellUp') > -1)
	{
		myBoxObject = new CurvyCorners(tabWellUp,objWells);
		myBoxObject.applyCornersToAll();

	}
	else if (objWells.className.indexOf('tabWell') > -1)
	{
		myBoxObject = new CurvyCorners(tabWell,objWells);
		myBoxObject.applyCornersToAll();
	}


	// Register tabs
	var tabs = objTabs.getElementsByTagName('LI');
	for (tabKey = 0;tabKey < tabs.length;tabKey++)
	{
		if (tabs[tabKey].title !== undefined && tabs[tabKey].title !== null && tabs[tabKey].title !== '' && tabs[tabKey].tagName == 'LI')
		{
			tabs[tabKey].tabTitle = tabs[tabKey].title.replace(/\s/gi,'_');
			tabs[tabKey].title = tabs[tabKey].title.toString().replace(objWells.id,'');
			
			tabs[tabKey].Deactivate = Deactivate;
			tabs[tabKey].Activate = Activate;
			tabs[tabKey].onclick = LoadTab;
			tabs[tabKey].HTMLNative = tabs[tabKey].innerHTML;

			tabs[tabKey].rootWell = objWells;
			tabs[tabKey].rootTabs = objTabs;

			tabs[tabKey].boolCollapsible = boolCollapsible;
			tabs[tabKey].boolAnimate = boolAnimate;

			tabs[tabKey].onselectstart = noSelect;

			if (arrGroup !== undefined && arrGroup !== null)
			{
				tabs[tabKey].wellGroup = arrSuperGroup;
			}

			if (strDefaultTab == tabs[tabKey].tabTitle)
			{
				tabs[tabKey].Activate();
			}
			else
			{
				tabs[tabKey].Deactivate();
			}

			arrTabs[arrTabs.length] = tabs[tabKey];
		}
	}

	function searchTabs(tabGroup,key)
	{
		for (tab = 0;tab < tabGroup.length;tab++)
		{
			if (tabGroup[tab].tabTitle == key)
			{
				return true;
			}
		}
	}

	// Register wells
	var wells = objWells.getElementsByTagName('DIV');
	for (wellKey = 0;wellKey < wells.length;wellKey++)
	{
		if (wells[wellKey].id !== undefined && wells[wellKey].id !== null && wells[wellKey].id !== '' && wells[wellKey].tagName == 'DIV' && searchTabs(tabs,wells[wellKey].id))
		{

			if (objTabs.className.indexOf('accordion') > -1)
			{
				wells[wellKey].onmouseover = function()
				{
					boolAccordionHover = false;
				};

				wells[wellKey].onmouseout = function()
				{
					boolAccordionHover = true;
				};

				wells[wellKey].onclick = function()
				{
					boolAccordionHover = false;
				};
			}

			wells[wellKey].Deactivate = Deactivate;
			wells[wellKey].Activate = Activate;

			oldPosition = wells[wellKey].style.position;
			wells[wellKey].style.position = 'absolute';
			wells[wellKey].height = wells[wellKey].clientHeight;

			if (wells[wellKey].clientHeight > intAccordianHeight)
			{
				intAccordianHeight += wells[wellKey].clientHeight;
			}
			wells[wellKey].style.position = oldPosition;


			if (arrGroup !== undefined && arrGroup !== null)
			{
				arrSuperGroup[arrSuperGroup.length] = wells[wellKey];
			}

			if (strDefaultTab == wells[wellKey].id)
			{
				wells[wellKey].Activate();
			}
			else
			{
				wells[wellKey].Deactivate();
			}
			arrWells[arrWells.length] = wells[wellKey];
		}
	}
	for (tabKey = 0;tabKey < tabs.length;tabKey++) // Assign actions to tabs
	{
		if (tabs[tabKey].tabTitle !== undefined && tabs[tabKey].tagName == 'LI')
		{
			tabs[tabKey].tabs = arrTabs;
			tabs[tabKey].wells = arrWells;
		}
	}

	if (arrGroup !== undefined && arrGroup !== null)
	{
		arrSuperGroup[arrSuperGroup.length] = objWells;
	}
	if (boolStartState) // Set initial root well state
	{
		objWells.currentHeight = $(strDefaultTab).height;
		objWells.Activate();
	}
	else
	{
		objWells.currentHeight = 0;
		objWells.HTML = objWells.innerHTML;
		objWells.intAccordianHeight = intAccordianHeight;
		objWells.Deactivate();
	}
}

/////////////////////////////////////////////
// Function - noSelect
// Description - unselect page elements
// Arguements - None
/////////////////////////////////////////////

function noSelect() {return false;}
var $ =  function(strId){return document.getElementById(strId);}

/////////////////////////////////////////////
// Library - Light weight Animation by Marco Wolfsheimer
// Description - Simple timeline and playback
// Arguements - N/A
/////////////////////////////////////////////
var worldTimeline=new Array();
var worldFrameRate=30;
var transEffects=true;

function addAction(a,b,c,d,e,f,g,h,i){arrActionTypes={"width":"w","height":"h","top":"y","left":"x","alpha":"a","scrollx":"sx","scrolly":"sy","backgroundx":"bgx","backgroundy":"bgy"};if(g==null){g=0}if(h==null){h=0}if(i==null){i=worldFrameRate}totalFrames=(d-c)*i;c=c*1000;timeLegnth=d*1000;animTime=c;frameCounter=1;while((animTime+c)<(c+timeLegnth)){if(worldTimeline[animTime]==null){worldTimeline[animTime]=new Array()}if(worldTimeline[animTime][a]==null){worldTimeline[animTime][a]=new Array()}intSinIn=((((1-Math.sin(((totalFrames-frameCounter)/totalFrames)*1.5752))*(f-e)))+parseInt(e));intLinIn=(1-((totalFrames-frameCounter)/totalFrames))*(f-e)+parseInt(e);intSinOut=(((Math.sin((((totalFrames-frameCounter)/totalFrames)*1.5752)+1.5752))*(f-e))+parseInt(e));intLinOut=(1-((totalFrames-frameCounter)/totalFrames))*(f-e)+parseInt(e);intCurve=Math.round(((intLinIn-((intLinIn-intSinIn)*(g/100)))+(intLinOut-((intLinOut-intSinOut)*(h/100))))/2);worldTimeline[animTime][a.toString()][arrActionTypes[b]]=intCurve;worldTimeline[animTime][a.toString()]['t']=animTime;animTime=Math.round(c+(frameCounter*(1000/i)));frameCounter++}timeLegnth=Math.round(timeLegnth);worldTimeline[timeLegnth]=new Array();worldTimeline[timeLegnth][a]=new Array();worldTimeline[timeLegnth][a][arrActionTypes[b]]=Math.round(f);worldTimeline[timeLegnth][a]['t']=Math.round(f)}function addScript(a,b){if(worldTimeline[b*1000]==null){worldTimeline[b*1000]=new Array()}if(worldTimeline[b*1000]['javascript'] === undefined){worldTimeline[b*1000]['javascript']=a;}else{worldTimeline[b*1000]['javascript']+=a;}}function playTimeline(){for(time in worldTimeline){var a="";for(targetId in worldTimeline[time]){if(targetId=='javascript'){setTimeout(worldTimeline[time]['javascript'],time)}else{for(attributeType in worldTimeline[time][targetId]){if(typeof(worldTimeline[time][targetId][attributeType])=='number'){a=a+'setLayer'+attributeType+'(\''+targetId+'\','+worldTimeline[time][targetId][attributeType].toString()+");"}}}}setTimeout('try{' + a + '}catch(e){}',time)}worldTimeline=new Array()}function hideLayer(a){$(a).style.visibility='hidden'}function showLayer(a){$(a).style.visibility='visible'}function setLayera(a,b){if(b!=null){$(a).style.opacity=(b/100);$(a).style.filter="alpha(opacity="+b+");";$(a).style.MozOpacity=(b/100)}if($(a).visibility=='hidden'){showLayer(a)}}function setLayerx(a,b){if(b!=null){$(a).style.left=b+'px'}}function setLayery(a,b){if(b!=null){$(a).style.top=b+'px'}}function setLayerw(a,b){if(b!=null){$(a).style.width=b+'px'}}function setLayerh(a,b){if(b!=null){$(a).style.height=b+'px'}}function setLayert(a,b){}function setLayersx(a,b){if(!bollScheduleDrag){if(b!=null){$(a).scrollLeft=b}}}function setLayersy(a,b){if(!bollScheduleDrag){if(b!=null){$(a).scrollTop=b}}}function setLayerbgx(a,b){$(a).style.backgroundPosition=b+'px 0px'}function setLayerbgy(a,b){$(a).style.backgroundPosition='0px '+b+'px'}


/////////////////////////////////////////////
// Function - CreateDropDown
// Description - Attach show and hide function to menu items
// Arguements - (element) Menu group
/////////////////////////////////////////////
function CreateDropDown(objTarget)
{
	var arrListItens = [];
	var arrActiveListItens = [];

	var objLi = objTarget.getElementsByTagName('LI');
	var liKey;
	for (liKey=0; liKey < objLi.length; liKey++)
	{
		if (objLi[liKey].className.indexOf('active') > -1 && objLi[liKey].className.indexOf('inactive') === -1)
		{
			arrActiveListItens[arrActiveListItens.length] = objLi[liKey];
		}
		else
		{
			arrListItens[arrActiveListItens.length] = objLi[liKey];
		}
	}

	for (liKey=0; liKey < objLi.length; liKey++)
	{
		objLi[liKey].listItems = arrListItens;
		objLi[liKey].activeListItems = arrActiveListItens;

		objLi[liKey].Activate = Activate;
		objLi[liKey].Deactivate = Deactivate;

		if(objLi[liKey].getElementsByTagName('UL').length > 0)
		{
			objLi[liKey].onmouseover = function()
			{
				for (var keyItem=0; keyItem < this.activeListItems.length; keyItem++)
				{
					this.activeListItems[keyItem].Deactivate();
				}
				this.Activate();
			};

			objLi[liKey].onfocus = function()
			{
				for (var keyItem=0; keyItem < this.activeListItems.length; keyItem++)
				{
					this.activeListItems[keyItem].Deactivate();
				}
				this.Activate();
			};

			objLi[liKey].onmouseout = function()
			{
				this.Deactivate();
				for (var keyItem=0; keyItem < this.activeListItems.length; keyItem++)
				{
					this.activeListItems[keyItem].Activate();
				}
			};
		}
	}
}

/////////////////////////////////////////////
// Function - CreateSlideShow
// Description - unselect page elements
// Arguements - (element)
/////////////////////////////////////////////


var slideShowTimeout;
var arrSlideId = [];

function CreateSlideShow(elemSlideWell,elemWell,elemNavigation,intWidth,intHeight)
{
	elemWell.style.width = intWidth + 'px';
	elemWell.style.height = intHeight + 'px';

	var intSlideCursor = 0;

	for (var slide=0; slide< elemSlideWell.length;slide++)
	{
		arrSlideId[arrSlideId.length] = 'slide_' + intSlideCursor;

		var elemSlide = document.createElement('DIV');
		elemSlide.id = 'slide_' + intSlideCursor;
		elemSlide.style.position = 'absolute';
		elemSlide.style.width = intWidth + 'px';
		elemSlide.style.height = intHeight + 'px';
		
		elemSlide.url = elemSlideWell[slide]['url'];
		elemSlide.style.backgroundImage = 'url(' + elemSlideWell[slide]['image'] + ')';
		elemSlide.style.cursor = 'pointer';
		
		elemSlide.innerHTML = '<h1 style="color:' + elemSlideWell[slide]['headingColor'] + ';">' + elemSlideWell[slide]['heading'] + '</h1><p style="color:' + elemSlideWell[slide]['textColor'] + ';">' + elemSlideWell[slide]['text'] + '</p>';
		
		elemSlide.onclick = function()
		{
			httpIndex = this.url.indexOf('http')
			
			if(httpIndex>=0)
				{
				window.open(this.url);
			}
			else{
			document.location = this.url;
			}
		}

		elemWell.appendChild(elemSlide);

		if (slide > 0)
		{
			setLayera(elemSlide.id,0);
		}
		else
		{
			setLayera(elemSlide.id,100);
		}
		intSlideCursor++;
	}
	elemWell.intCurrentSlide = 0;
	elemWell.elemSlides = arrSlideId;

	var elemPlay = document.createElement('DIV');
	elemPlay.className = 'number pause';
	elemPlay.id = 'slide_playPause';
	elemPlay.elemSlideWell = elemWell;


	elemPlay.onclick = function PlayPause(strSlideShow)
	{
		if (slideShowTimeout === null)
		{
			PlaySlideShow(this.elemSlideWell.id);
			this.className = 'number pause';
		}
		else
		{
			clearTimeout(slideShowTimeout);
			slideShowTimeout = null;
			this.className = 'number play';
		}
	}


	elemNavigation.appendChild(elemPlay);

	for (i = 0; i < arrSlideId.length;i++)
	{
		var elemNumber = document.createElement('DIV');
		elemNumber.className = 'number inactive';
		elemNumber.id = 'slideNav_' + i;
		elemNumber.innerHTML = i + 1;
		elemNumber.intSlide = i;
		elemNumber.elemSlideWell = elemWell;
		elemNumber.elemSlides = arrSlideId;
		elemNumber.onclick = function()
		{
			clearTimeout(slideShowTimeout);
			slideShowTimeout = null;
			$('slide_playPause').className = 'number play';

			if ( this.elemSlideWell.intCurrentSlide != this.intSlide)
			{
				$('slideNav_' + + this.elemSlideWell.intCurrentSlide).className = 'number inactive';
				$('slideNav_' + this.intSlide).className = 'number active';

				SlideShowTransition('slide_' + this.elemSlideWell.intCurrentSlide,'slide_' + this.intSlide)
				this.elemSlideWell.intCurrentSlide = this.intSlide;
			}
		}

		elemNavigation.appendChild(elemNumber);
	}

	$('slideNav_0').className = 'number active';

	elemWell.intTotalSlides = i;
	slideShowTimeout = setTimeout("PlaySlideShow('" + elemWell.id + "');",intTrnasitionDelay);
	SlideShowTransition('slide_0'  ,'slide_0' );
	elemSlideWell.intCurrentSlide = 0;
}

function PlaySlideShow(strShowWell)
{
	var elemSlideWell = $(strShowWell);

	if (elemSlideWell.intCurrentSlide  == (elemSlideWell.intTotalSlides - 1))
	{
		SlideShowTransition('slide_' + elemSlideWell.intCurrentSlide,'slide_0');

		$('slideNav_' + elemSlideWell.intCurrentSlide).className = 'number inactive';
		$('slideNav_0').className = 'number active';
		elemSlideWell.intCurrentSlide = 0;
	}
	else
	{
		SlideShowTransition('slide_' + elemSlideWell.intCurrentSlide,'slide_' + (elemSlideWell.intCurrentSlide + 1));
		$('slideNav_' + elemSlideWell.intCurrentSlide).className = 'number inactive';
		$('slideNav_' + (elemSlideWell.intCurrentSlide + 1)).className = 'number active';

		elemSlideWell.intCurrentSlide++;
	}
	slideShowTimeout = setTimeout("PlaySlideShow('" + elemSlideWell.id + "');",intTrnasitionDelay);
}

function SlideShowTransition(strForm,strTo)
{
	for (i = 0; i < arrSlideId.length;i++)
	{
		$(arrSlideId[i]).style.zIndex = 0
		setLayera(arrSlideId[i],0);
	}
	setLayera(strForm,100);

	$(strForm).style.zIndex = 1;
	$(strTo).style.zIndex = 2;

	addAction(strForm,'alpha',intTrnasitionTime,intTrnasitionTime,0,0,0,0,20)
	addAction(strTo,'alpha',0,intTrnasitionTime,0,100,0,0,20);
	playTimeline();
}

function d2h(d) {return d.toString(16);}

function colorToHex(strColor)
{
	if (strColor.indexOf('#') === -1)
	{
		var arrRGB = strColor.match(/[0-9]{3}/gi);
		var arrHexOut = Array();
		for (var key=0;key<arrRGB.length;key++)
		{
			if (arrRGB[key] !== null)
			{
				arrHexOut[key] = d2h(parseFloat(arrRGB[key]));
			}
		}
		return arrHexOut.join('');
	}
	else
	{
		return strColor.replace('#','');
	}
}

function registerFlipper(objGroup)
{

	var objFlipperGroup = objGroup.getElementsByTagName('LI');
	var boolFirstSlide = true;
	var intItemCount = 0;

	for (liKey = 0;liKey < objFlipperGroup.length;liKey++)
	{
		if (objFlipperGroup[liKey].tagName == 'LI')
		{
			if(boolFirstSlide)
			{
				objFlipperGroup[liKey].style.display = 'block';
				boolFirstSlide = false;
				objGroup.position = 0;
			}
			else
			{
				objFlipperGroup[liKey].style.display = 'none';
			}
			intItemCount++;
		}
	}
	objGroup.itemCount = intItemCount;
}

function flipNext(strGroup)
{
	var objFlipperGroup = $(strGroup).getElementsByTagName('LI');

	if ($(strGroup).position + 1 == $(strGroup).itemCount)
	{
		$(strGroup).position =	0;
	}
	else
	{
		$(strGroup).position++;
	}


	for (liKey= 0; liKey < $(strGroup).itemCount;liKey++)
	{
		if (objFlipperGroup[liKey].tagName === 'LI')
		{
			if (liKey == $(strGroup).position)
			{
				objFlipperGroup[liKey].style.display = 'block';
			}
			else
			{
				objFlipperGroup[liKey].style.display = 'none';
			}
		}
	}
}


function flipBack(strGroup)
{
	var objFlipperGroup = $(strGroup).getElementsByTagName('LI');
	if ($(strGroup).position - 1 === -1)
	{
		$(strGroup).position =	$(strGroup).itemCount -1;
	}
	else
	{
		$(strGroup).position--;
	}

	for (liKey= 0; liKey < $(strGroup).itemCount;liKey++)
	{
		if (objFlipperGroup[liKey].tagName === 'LI')
		{
			if (liKey == $(strGroup).position)
			{
				objFlipperGroup[liKey].style.display = 'block';
			}
			else
			{
				objFlipperGroup[liKey].style.display = 'none';
			}
		}
	}
}

/////////////////////////////////////////////
// Function - fetchScrollTop
// Description - Return vertical window scroll
// Arguements - (string) Slide show group container
/////////////////////////////////////////////
			
function fetchScrollTop()
{
	var scrOfY = 0;
	if( typeof( window.pageYOffset ) == 'number' ) {

		scrOfY = window.pageYOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {

		scrOfY = document.body.scrollTop;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		scrOfY = document.documentElement.scrollTop;
	}
	return scrOfY;
}
					
					
/////////////////////////////////////////////
// Function - ShowGallery
// Description - Return vertical window scroll
// Arguements - (string) Slide show group container
/////////////////////////////////////////////

	
function ShowGallery(intPicture,objData)
{
	if (typeof(document.createElement) == 'function' || typeof(document.createElement) == 'object')
	{
		if($('gallery'))
		{
			$('gallery').style.display = 'block';	
		}

		var bodyDim = BodyWidth();
	
		if (!$('galleryBackground'))
		{
	
			galleryBackground =  DOMQuickCreate('DIV','galleryBackground','galleryBackground',document.body);
			galleryBackground.style.height = document.body.clientHeight + 20 + 'px';
			galleryBackground.onclick = function(){
			HideGallery();
		};

		gallery = DOMQuickCreate('DIV','gallery','gallery',document.body);
		gallery.style.top = fetchScrollTop() + 300 + 'px';
		gallery.style.display = 'block';

		gallery.innerHTML =  '<table cellpadding="0" cellspacing="0" border="0"><tr><td align="center" valign="middle"><div class="galleryClose"><a href="#" onClick="HideGallery();return false;">close</a> <img src="/oracleUCM/groups/public/documents/system/deco-button-close.gif" alt="Close" onClick="HideGallery();"/></div><div id="galleryFrame" class="galleryFrame"></div></td></tr></table>';
	
		}

	DrawSlide(intPicture,objData,true);
	
	setLayera('galleryBackground',0);
	$('galleryBackground').style.display = 'block';	
	addAction('galleryBackground','alpha',0,.45,0,60,0,0);
	playTimeline();

	}	
}

function DOMQuickCreate(strTag,strId,strClass,elemParent)
{
	var elemNew = document.createElement(strTag);
	if (strClass)
	{
		elemNew.className = strClass;
	}
	if (strId)
	{
		elemNew.id = strId;
	}
	elemParent.appendChild(elemNew);
	return elemNew;
}
			
			function DrawSlide(intPicture,objData,boolHidden)
			{
				
				if($('gallerySlide_' + objData.position))
				{
					$('gallerySlide_' + objData.position).style.zIndex = 980;
				}
				
				if (!$('gallerySlide_' + intPicture))
				{
					var gallerySlide = DOMQuickCreate('DIV','gallerySlide_' + intPicture,'gallerySlide', $('galleryFrame'));
					
					var galleryH1 = DOMQuickCreate('H1',null,null, gallerySlide);
					galleryH1.innerHTML = objData[intPicture].description;

					gallerySlide.style.zIndex = 985;
					var mediaFrame = DOMQuickCreate('DIV','mediaFrame' + intPicture,'mediaFrame', gallerySlide);
						
					var image = DOMQuickCreate('IMG','galleryImage_' + intPicture ,null, mediaFrame);
					image.src = objData[intPicture].src + '?seed=' + Math.random();
					
					image.onload = function()
					{
										
						gallerySlide.style.display = 'block';
					
						var rmCorner = {
							tl: { radius: 5 },
							tr: { radius: 5 },
							bl: { radius: 5 },
							br: { radius: 5 },
							antiAlias: true,
							autoPad: true,
							validTags: ["div"]
						};
						
						var myBoxObject = new CurvyCorners(rmCorner,gallery);
						myBoxObject.applyCornersToAll();
						
						
						$('mediaFrame' + intPicture).style.left = (530 / 2) - (this.width / 2) - 5 + 'px';
						$('mediaFrame' + intPicture).style.top = (325 / 2) - (this.height / 2) + 'px';
						$('mediaFrame' + intPicture).style.width =  this.width + 10 + 'px';
						$('mediaFrame' + intPicture).style.height =  this.height + 'px';

						if($('gallerySlide_' + objData.position))
						{					
							$('gallerySlide_' + objData.position).style.display = 'none';
						}
						
						if (boolHidden)
						{
							objData.position = intPicture;
						}
						else
						{
							gallerySlide.style.display = 'none';
						}
					};
				
											
					var controls = DOMQuickCreate('DIV',null,'controls', gallerySlide);
					
					if (intPicture !== 0)
					{
						var previous = DOMQuickCreate('DIV',null,'previous', controls);
						previous.innerHTML = '<img src="/oracleUCM/groups/public/documents/system/deco-button-left.gif" alt="Previous"/> <a href="#" onclick="return false;">Previous</a></div>';
						previous.onclick = function()
						{
							DrawSlide(intPicture - 1,objData,true);
						}
					}
					
					if (intPicture !== objData.length - 1)
					{
						var next = DOMQuickCreate('DIV',null,'next', controls);
						next.innerHTML = '<a href="#" onclick="return false;">Next</a> <img src="/oracleUCM/groups/public/documents/system/deco-button-right.gif" alt="Next"/>';
						next.onclick = function()
						{
							DrawSlide(intPicture + 1,objData,true);
						}
					}
							
					pagnation = DOMQuickCreate('P',null,null, controls);
					pagnation.innerHTML = 'Picture ' + (intPicture + 1) + ' of ' + objData.length;
					
				}
				else
				{
					if (intPicture !== objData.position)
					{
						$('gallerySlide_' + intPicture).style.display = 'block';
						
						
						if($('gallerySlide_' + objData.position))
						{					
							$('gallerySlide_' + objData.position ).style.display = 'none';
						}
						
						if (boolHidden)
						{
							objData.position = intPicture;
						}
					}
				}
				
				
			}
			
function HideGallery()
{
	$('gallery').style.display = 'none';
	addAction('galleryBackground','alpha',0,.45,60,0,0,0);
	addScript("$('galleryBackground').style.display = 'none';",.5);
	playTimeline();
}
		

function chkMail(strEmail)
{
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(strEmail))
	{
		return true;
	}
	else
	{
		return false;
	}
}

	function sendEmailAJAX()
	{
		var xmlHttp=null;
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(exception_iexplore)
		{
			try
			{
				xmlHttp=new XMLHttpRequest();
			}
			catch(exception_firefox)
			{
				xmlHttp=null;
			}
		}
		if(xmlHttp==null)
			{
			alert('Your Browser Does Not Support AJAX!');
			}
		else
			{
			jtheirName=  document.emailPage.theirName.value;
			jtheirEmail=   document.emailPage.theirEmail.value;
			jtextarea=  escape(document.emailPage.textarea.value);
			//jyourName=  document.emailPage.yourName.value;
			//jyourEmail=  document.emailPage.yourEmail.value;
			jpageTitle = document.title;
			jpageUrl=location.href;
			jurl = window.location.href + "?IdcService=EMAIL_THIS_PAGE&pageUrl=" + jpageUrl+ "&theirName=" + jtheirName + "&theirEmail=" + jtheirEmail + "&textarea=" + jtextarea + "&pageTitle=" +jpageTitle ;
			xmlHttp.open("GET", jurl + "&rand=" + Math.random()*5000,false);
			xmlHttp.send(null);
			}
	}

				
			function emailPage(strHREF,siteId)
			{
				if (typeof(document.createElement) == 'function' || typeof(document.createElement) == 'object')
				{
					var bodyDim = BodyWidth();
	
					if (!$('rm'))
					{	
					
						if (!$('rmBackground'))
						{	
							elemRmBackground =  DOMQuickCreate('DIV','rmBackground','rmBackground',document.body);
							elemRmBackground.style.height = document.body.clientHeight + 20 + 'px';
							elemRmBackground.onclick = function(){
								hideRm($('rm'));
							};
						}
						
						elemRm =  DOMQuickCreate('DIV','rm','rm',document.body);
						elemRm.style.top = fetchScrollTop() + 300 + 'px';
						elemRm.style.display = 'block';
						elemRm.style.visibility = 'hidden';
						var strEmailThisPage = "Email This Page";
						var strClose = "Close";
						var strTheirName = "Their Name";
						var strYourName = "Your Name";
						var strTheirEmail = "Their email address";
						var strYourEmail = "Your email address";
						var strSend = "SEND";
						var strCancel = "CANCEL";
						var strMessage = "Your message";
						var strMessageText = "Hello,\n\nI would like to share a link with you.\n\n" + strHREF + "\n\nKind Regards,\nThe COLT Team";
						// var strSenderEmail =  <$#env.Sender_emailId$>	
													
						HideDropDownOnAPage();

						elemRm.innerHTML =  '<form name="emailPage" method=post action="?IdcService=EMAIL_THIS_PAGE"><input type="hidden" name="pageTitle" value="'+document.title+'"><input type="hidden" name="pageUrl" value="'+location.href+'"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="middle" align="center"><h1>' + strEmailThisPage + '</h1> <div class="rmClose"> <a onclick="hideRm($(\'rm\'));window.location.href=window.location.href;return false;" href="#">'  + strClose + '</a> <img onClick="hideRm($(\'rm\'));window.location.href=window.location.href;return false;"alt="Close" src="/COLTImages/deco-button-close.gif"/></div><div class="rmFrame" id="rmFrame" style="text-align: left;"><div class="rmSlide" id="email_step1" style="display: block; width: 525px;"><div style="width: 250px;float:left;"><p> ' + strTheirName + ':<input type="text" class="text" name="theirName" id="theirName"/></p><p> ' + strTheirEmail + ':<input type="text" class="text" name="theirEmail" id="theirEmail"/></p><p>' + strMessage + ':</p></div><textarea name="textarea" class="textarea">'+ strMessageText +'</textarea></p><div class="controls"><div class="previous" onclick="hideRm($(\'rm\'));window.location.href=window.location.href;return false;"><span class="button"><a class="label" href="#">' + strCancel + ' </a><a href="#"><img class="cap" alt="CANCEL" src="/COLTImages/layout_button_rcapsmall.gif"/></a></span></div><div class="next" onclick="javascript:{if (validateEmailer()==true){sendEmailAJAX();return false;}else{return false;}}"><span class="button"><a class="label" href="#">' + strSend + ' </a><a href="#"><img class="cap" alt="SEND" src="/COLTImages/layout_button_rcapsmall.gif"/></a></span></div></div></div></div></td></tr></tbody></table></form>';
					
						var rmCorner = {
							tl: { radius: 5 },
							tr: { radius: 5 },
							bl: { radius: 5 },
							br: { radius: 5 },
							antiAlias: true,
							autoPad: true,
							validTags: ["div"]
						};
						
						var myBoxObject = new CurvyCorners(rmCorner,elemRm);
						myBoxObject.applyCornersToAll();
						
						elemRm.style.display = 'none';
						elemRm.style.visibility = '';
					}
					
					setLayera('rmBackground',0);
					$('rmBackground').style.display = 'block';
					addAction('rmBackground','alpha',0,.45,0,60,0,0);
					
					addScript("$('rm').style.display = 'block';",.45);
					playTimeline();
				}
			}

						
			function registerUser()
			{
				if (typeof(document.createElement) == 'function' || typeof(document.createElement) == 'object')
				{
					var bodyDim = BodyWidth();
	
					if (!$('register'))
					{	
				
						if (!$('rmBackground'))
						{	
							elemRmBackground =  DOMQuickCreate('DIV','rmBackground','rmBackground',document.body);
							elemRmBackground.style.height = document.body.clientHeight + 20 + 'px';
							elemRmBackground.onclick = function()
							{
								hideRm($('register'));
							};
						}
						
						elemRm =	DOMQuickCreate('DIV','register','rm',document.body);
						elemRm.style.top = fetchScrollTop() + 300 + 'px';
						elemRm.style.display = 'block';
						elemRm.style.visibility = 'hidden';
						
						elemRm.innerHTML =  '<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="middle" align="center"><h1>Register Now</h1><div class="rmClose"> <a onclick="hideRm($(\'register\'));return false;" href="#">close</a> <img onClick="hideRm($(\'register\'));return false;" alt="Close" src="/oracleUCM/groups/public/documents/system/deco-button-close.gif"/></div><div class="rmFrame" id="rmFrame" style="text-align: left;"><div class="rmSlide" id="email_step1" style="display: block; width: 525px;"><div style="width: 250px;float:left;"><p>Your Name: <input type="text" class="text" id="yourName"/></p><p>Telephone number: <input type="text" class="text" id="telephoneNumber"/></p></div><div style="width: 250px;float:right;"><p>Email address:<input type="text" class="text" id="emailAddress"/></p><p>Company:<input type="text" class="text" id="company"/></p></div><div class="clearfix"></div>\
						<div class="controls"><div class="previous" onclick="hideRm($(\'register\'));return false;"><span class="button"><a class="label" href="#">CANCEL</a><a href="#"><img class="cap" alt="CANCEL" src="/oracleUCM/groups/public/documents/system/layout_button_rcapSmall.gif"/></a></span></div><div class="next" onclick="validateRegister(); return false;"><span class="button"><a class="label" href="#">SEND</a><a href="#"><img class="cap" alt="SEND" src="/oracleUCM/groups/public/documents/system/layout_button_rcapSmall.gif"/></a></span></div></div></div></div></td></tr></tbody></table>';
						
						var rmCorner = {
							tl: { radius: 5 },
							tr: { radius: 5 },
							bl: { radius: 5 },
							br: { radius: 5 },
							antiAlias: true,
							autoPad: true,
							validTags: ["div"]
						};
						
						var myBoxObject = new CurvyCorners(rmCorner,elemRm);
						myBoxObject.applyCornersToAll();
						
						elemRm.style.display = 'none';
						elemRm.style.visibility = '';
					}
					
					setLayera('rmBackground',0);
					$('rmBackground').style.display = 'block';
					addAction('rmBackground','alpha',0,.45,0,60,0,0);
					addScript("$('register').style.display = 'block';",.45);
					playTimeline();
				}
			}

function validateEmailer()
{
	var boolIsValid = true;
	var strErrorMsg = '';
	
	if(!chkMail($('theirEmail').value))
	{
		strErrorMsg += "You haven't supplied a valid 'to' email address.\n";
		boolIsValid = false;
	}
	
	/*if(!chkMail($('yourEmail').value))
	{
		strErrorMsg += "You haven't supplied a valid 'from' email address.\n";
		boolIsValid = false;
	}*/
	
	if($('theirName').value === '' || $('theirName').value === null)
	{
		strErrorMsg += "You haven't supplied a recipient name.\n";
		boolIsValid = false;
	}
	
	/*if($('yourName').value === '' || $('yourName').value === null)
	{
		strErrorMsg += "You haven't supplied a sender name..\n";
		boolIsValid = false;
	}*/
	
	if(boolIsValid)
	{
		hideRm($('rm'));
	}
	else
	{
		alert(strErrorMsg);
	}
	return boolIsValid;
	
}

function validateRegister()
{
	var boolIsValid = true;
	var strErrorMsg = '';
	
	if(!chkMail($('yourName').value))
	{
		strErrorMsg += "You haven't told us your name.\n";
		boolIsValid = false;
	}
	
	if(!chkMail($('emailAddress').value))
	{
		strErrorMsg += "You haven't supplied a valid email address.\n";
		boolIsValid = false;
	}
	
	if($('telephoneNumber').value === '' || $('theirName').value === null)
	{
		strErrorMsg += "You haven't supplied a telephone number.\n";
		boolIsValid = false;
	}
	
	if($('yourName').value === '' || $('yourName').value === null)
	{
		strErrorMsg += "You haven't supplied a company.\n";
		boolIsValid = false;
	}
	
	if(boolIsValid)
	{
		hideRm($('register'));
	}
	else
	{
		alert(strErrorMsg);
	}
}

function hideRm(elemTarget)
{
	elemTarget.style.display = 'none';
	addAction('rmBackground','alpha',0,.45,60,0,0,0);
	addScript("$('rmBackground').style.display = 'none';",.5);
	playTimeline();

	ShowDropDownOnAPage();
}

function textInputUnGhost(elemTarget)
{
	if (!elemTarget.status)
	{
		if(!elemTarget.strRestColor){
			elemTarget.strRestColor = elemTarget.style.color;
		}
		if(!elemTarget.strRest)
		{
			elemTarget.strRest = elemTarget.value;
		}
		elemTarget.style.color = '#000000';
		elemTarget.value = '';
		elemTarget.status = true;
		elemTarget.name = elemTarget.title;
	}
}

function textInputGhost(elemTarget)
{
	if (elemTarget.value === '' || elemTarget.value === null)
	{
		elemTarget.value = elemTarget.strRest;
		elemTarget.style.color = '#999999';
		elemTarget.status = false;
		elemTarget.name = '';
	}
}

function switchLoginTarget(elemSource)
{
	if($(elemSource).value !== null && $(elemSource).value !== '')
	{
		var target = $(elemSource).options[$(elemSource).selectedIndex].value.split('|');
		var targetWindow = target[0];
		var targetUrl = target[1];
		if(targetWindow!=='')
			{		
			window.open(targetUrl,targetWindow);
			}		
		else
			{
				window.open(targetUrl,'_self');
			}
	}
	else
	{
		alert("Please select an application from the drop down menu.")
	}
}	

function loginPaneSwitch(elemFrom,elemTo)
{
	Activate(elemTo);
	Deactivate(elemFrom);	
}

/*	sIFR 2.0.2
	Copyright 2004 - 2006 Mike Davidson, Shaun Inman, Tomas Jogin and Mark Wubben

	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
*/

var hasFlash=function(){var a=6;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1){document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');if(window.hasFlash!=null)return window.hasFlash}if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var b=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return parseInt(b.charAt(b.indexOf(".")-1))>=a}return false}();String.prototype.normalize=function(){return this.replace(/\s+/g," ")};if(Array.prototype.push==null){Array.prototype.push=function(){var i=0,a=this.length,b=arguments.length;while(i<b){this[a++]=arguments[i++]}return this.length}}if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[];var d,e;if(!a)a=window;if(!b)b=[];for(var i=0;i<b.length;i++){c[i]="b["+i+"]"}e="a.__applyTemp__("+c.join(",")+");";a.__applyTemp__=this;d=eval(e);a.__applyTemp__=null;return d}}function named(a){return new named.Arguments(a)}named.Arguments=function(a){this.oArgs=a};named.Arguments.prototype.constructor=named.Arguments;named.extract=function(a,b){var c,d;var i=a.length;while(i--){d=a[i];if(d!=null&&d.constructor!=null&&d.constructor==named.Arguments){c=a[i].oArgs;break}}if(c==null)return;for(e in c)if(b[e]!=null)b[e](c[e]);return};var parseSelector=function(){var a=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function r(s,t){var u=s.split(/\s*\,\s*/);var v=[];for(var i=0;i<u.length;i++)v=v.concat(b(u[i],t));return v}function b(c,d,e){c=c.normalize().replace(" ","`");var f=c.match(a);var g,h,i,j,k,n;var l=[];if(f==null)f=[c,c];if(f[1]=="")f[1]="*";if(e==null)e="`";if(d==null)d=document;switch(f[2]){case "#":k=f[3].match(a);if(k==null)k=[null,f[3]];g=document.getElementById(k[1]);if(g==null||(f[1]!="*"&&!o(g,f[1])))return l;if(k.length==2){l.push(g);return l}return b(k[3],g,k[2]);case ".":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;k=f[3].match(a);if(k!=null){if(g.className==null||g.className.match("(\\s|^)"+k[1]+"(\\s|$)")==null)continue;j=b(k[3],g,k[2]);l=l.concat(j)}else if(g.className!=null&&g.className.match("(\\s|^)"+f[3]+"(\\s|$)")!=null)l.push(g)}return l;case ">":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;j=b(f[3],g,">");l=l.concat(j)}return l;case "`":h=m(d,f[1]);for(i=0,n=h.length;i<n;i++){g=h[i];j=b(f[3],g,"`");l=l.concat(j)}return l;default:if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;l.push(g)}return l}}function m(d,o){if(o=="*"&&d.all!=null)return d.all;return d.getElementsByTagName(o)}function o(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}return r}();var sIFR=function(){var a="http://www.w3.org/1999/xhtml";var b=false;var c=false;var d;var ah=[];var al=document;var ak=al.documentElement;var am=window;var au=al.addEventListener;var av=am.addEventListener;var f=function(){var g=navigator.userAgent.toLowerCase();var f={a:g.indexOf("applewebkit")>-1,b:g.indexOf("safari")>-1,c:navigator.product!=null&&navigator.product.toLowerCase().indexOf("konqueror")>-1,d:g.indexOf("opera")>-1,e:al.contentType!=null&&al.contentType.indexOf("xml")>-1,f:true,g:true,h:null,i:null,j:null,k:null};f.l=f.a||f.c;f.m=!f.a&&navigator.product!=null&&navigator.product.toLowerCase()=="gecko";if(f.m&&g.match(/.*gecko\/(\d{8}).*/))f.j=new Number(g.match(/.*gecko\/(\d{8}).*/)[1]);f.n=g.indexOf("msie")>-1&&!f.d&&!f.l&&!f.m;f.o=f.n&&g.match(/.*mac.*/)!=null;if(f.d&&g.match(/.*opera(\s|\/)(\d+\.\d+)/))f.i=new Number(g.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]);if(f.n||(f.d&&f.i<7.6))f.g=false;if(f.a&&g.match(/.*applewebkit\/(\d+).*/))f.k=new Number(g.match(/.*applewebkit\/(\d+).*/)[1]);if(am.hasFlash&&(!f.n||f.o)){var aj=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;f.h=parseInt(aj.charAt(aj.indexOf(".")-1))}if(g.match(/.*(windows|mac).*/)==null||f.o||f.c||(f.d&&(g.match(/.*mac.*/)!=null||f.i<7.6))||(f.b&&f.h<7)||(!f.b&&f.a&&f.k<312)||(f.m&&f.j<20020523))f.f=false;if(!f.o&&!f.m&&al.createElementNS)try{al.createElementNS(a,"i").innerHTML=""}catch(e){f.e=true}f.p=f.c||(f.a&&f.k<312);return f}();function at(){return{bIsWebKit:f.a,bIsSafari:f.b,bIsKonq:f.c,bIsOpera:f.d,bIsXML:f.e,bHasTransparencySupport:f.f,bUseDOM:f.g,nFlashVersion:f.h,nOperaVersion:f.i,nGeckoBuildDate:f.j,nWebKitVersion:f.k,bIsKHTML:f.l,bIsGecko:f.m,bIsIE:f.n,bIsIEMac:f.o,bUseInnerHTMLHack:f.p}}if(am.hasFlash==false||!al.getElementsByTagName||!al.getElementById||(f.e&&(f.p||f.n)))return{UA:at()};function af(e){if((!k.bAutoInit&&(am.event||e)!=null)||!l(e))return;b=true;for(var i=0,h=ah.length;i<h;i++)j.apply(null,ah[i]);ah=[]}var k=af;function l(e){if(c==false||k.bIsDisabled==true||((f.e&&f.m||f.l)&&e==null&&b==false)||(al.body==null||al.getElementsByTagName("body").length==0))return false;return true}function m(n){if(f.n)return n.replace(new RegExp("%\d{0}","g"),"%25");return n.replace(new RegExp("%(?!\d)","g"),"%25")}function as(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}function o(p,q,r,s,t){var u="";var v=p.firstChild;var w,x,y,z;if(s==null)s=0;if(t==null)t="";while(v){if(v.nodeType==3){z=v.nodeValue.replace("<","&lt;");switch(r){case "lower":u+=z.toLowerCase();break;case "upper":u+=z.toUpperCase();break;default:u+=z}}else if(v.nodeType==1){if(as(v,"a")&&!v.getAttribute("href")==false){if(v.getAttribute("target"))t+="&sifr_url_"+s+"_target="+v.getAttribute("target");t+="&sifr_url_"+s+"="+m(v.getAttribute("href")).replace(/&/g,"%26");u+='<a href="asfunction:_root.launchURL,'+s+'">';s++}else if(as(v,"br"))u+="<br/>";if(v.hasChildNodes()){y=o(v,null,r,s,t);u+=y.u;s=y.s;t=y.t}if(as(v,"a"))u+="</a>"}w=v;v=v.nextSibling;if(q!=null){x=w.parentNode.removeChild(w);q.appendChild(x)}}return{"u":u,"s":s,"t":t}}function A(B){if(al.createElementNS&&f.g)return al.createElementNS(a,B);return al.createElement(B)}function C(D,E,z){var p=A("param");p.setAttribute("name",E);p.setAttribute("value",z);D.appendChild(p)}function F(p,G){var H=p.className;if(H==null)H=G;else H=H.normalize()+(H==""?"":" ")+G;p.className=H}function aq(ar){var a=ak;if(k.bHideBrowserText==false)a=al.getElementsByTagName("body")[0];if((k.bHideBrowserText==false||ar)&&a)if(a.className==null||a.className.match(/\bsIFR\-hasFlash\b/)==null)F(a, "sIFR-hasFlash")}function j(I,J,K,L,M,N,O,P,Q,R,S,r,T){if(!l())return ah.push(arguments);aq();named.extract(arguments,{sSelector:function(ap){I=ap},sFlashSrc:function(ap){J=ap},sColor:function(ap){K=ap},sLinkColor:function(ap){L=ap},sHoverColor:function(ap){M=ap},sBgColor:function(ap){N=ap},nPaddingTop:function(ap){O=ap},nPaddingRight:function(ap){P=ap},nPaddingBottom:function(ap){Q=ap},nPaddingLeft:function(ap){R=ap},sFlashVars:function(ap){S=ap},sCase:function(ap){r=ap},sWmode:function(ap){T=ap}});var U=parseSelector(I);if(U.length==0)return false;if(S!=null)S="&"+S.normalize();else S="";if(K!=null)S+="&textcolor="+K;if(M!=null)S+="&hovercolor="+M;if(M!=null||L!=null)S+="&linkcolor="+(L||K);if(O==null)O=0;if(P==null)P=0;if(Q==null)Q=0;if(R==null)R=0;if(N==null)N="#FFFFFF";if(T=="transparent")if(!f.f)T="opaque";else N="transparent";if(T==null)T="";var p,V,W,X,Y,Z,aa,ab,ac;var ad=null;for(var i=0,h=U.length;i<h;i++){p=U[i];if(p.className!=null&&p.className.match(/\bsIFR\-replaced\b/)!=null)continue;V=p.offsetWidth-R-P;W=p.offsetHeight-O-Q;aa=A("span");aa.className="sIFR-alternate";ac=o(p,aa,r);Z="txt="+m(ac.u).replace(/\+/g,"%2B").replace(/&/g,"%26").replace(/\"/g, "%22").normalize() + S + "&w=" + V + "&h=" + W + ac.t;F(p,"sIFR-replaced");if(ad==null||!f.g){if(!f.g){if(!f.n)p.innerHTML=['<embed class="sIFR-flash" type="application/x-shockwave-flash" src="',J,'" quality="best" wmode="',T,'" bgcolor="',N,'" flashvars="',Z,'" width="',V,'" height="',W,'" sifr="true"></embed>'].join("");else p.innerHTML=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" sifr="true" width="',V,'" height="',W,'" class="sIFR-flash"><param name="movie" value="',J,"?",Z,'"></param><param name="quality" value="best"></param><param name="wmode" value="',T,'"></param><param name="bgcolor" value="',N,'"></param> </object>'].join('')}else{if(f.d){ab=A("object");ab.setAttribute("data",J);C(ab,"quality","best");C(ab,"wmode",T);C(ab,"bgcolor",N)}else{ab=A("embed");ab.setAttribute("src",J);ab.setAttribute("quality","best");ab.setAttribute("flashvars",Z);ab.setAttribute("wmode",T);ab.setAttribute("bgcolor",N)}ab.setAttribute("sifr","true");ab.setAttribute("type","application/x-shockwave-flash");ab.className="sIFR-flash";if(!f.l||!f.e)ad=ab.cloneNode(true)}}else ab=ad.cloneNode(true);if(f.g){if(f.d)C(ab,"flashvars",Z);else ab.setAttribute("flashvars",Z);ab.setAttribute("width",V);ab.setAttribute("height",W);ab.style.width=V+"px";ab.style.height=W+"px";p.appendChild(ab)}p.appendChild(aa);if(f.p)p.innerHTML+=""}if(f.n&&k.bFixFragIdBug)setTimeout(function(){al.title=d},0)}function ai(){d=al.title}function ae(){if(k.bIsDisabled==true)return;c=true;if(k.bHideBrowserText)aq(true);if(am.attachEvent)am.attachEvent("onload",af);else if(!f.c&&(al.addEventListener||am.addEventListener)){if(f.a&&f.k>=132&&am.addEventListener)am.addEventListener("load",function(){setTimeout("sIFR({})",1)},false);else{if(al.addEventListener)al.addEventListener("load",af,false);if(am.addEventListener)am.addEventListener("load",af,false)}}else if(typeof am.onload=="function"){var ag=am.onload;am.onload=function(){ag();af()}}else am.onload=af;if(!f.n||am.location.hash=="")k.bFixFragIdBug=false;else ai()}k.UA=at();k.bAutoInit=true;k.bFixFragIdBug=true;k.replaceElement=j;k.updateDocumentTitle=ai;k.appendToClassName=F;k.setup=ae;k.debug=function(){aq(true)};k.debug.replaceNow=function(){ae();k()};k.bIsDisabled=false;k.bHideBrowserText=true;return k}();

if(typeof sIFR == "function" && !sIFR.UA.bIsIEMac){
	sIFR.setup();
};


/****************************************************************
*                                                              *
*  CurvyCorners                                                *
*  ------------                                                *
*                                                              *
*  This script generates rounded corners for your divs.        *
*                                                              *
*  Version 1.2.9                                               *
*  Copyright (c) 2006 Cameron Cooke                            *
*  By: Cameron Cooke and Tim Hutchison.                        *
*                                                              *
*                                                              *
*  Website: http://www.curvycorners.net                        *
*  Email:   info@totalinfinity.com                             *
*  Forum:   http://www.curvycorners.net/forum/                 *
*                                                              *
*                                                              *
*  This library is free software; you can redistribute         *
*  it and/or modify it under the terms of the GNU              *
*  Lesser General Public License as published by the           *
*  Free Software Foundation; either version 2.1 of the         *
*  License, or (at your option) any later version.             *
*                                                              *
*  This library is distributed in the hope that it will        *
*  be useful, but WITHOUT ANY WARRANTY; without even the       *
*  implied warranty of MERCHANTABILITY or FITNESS FOR A        *
*  PARTICULAR PURPOSE. See the GNU Lesser General Public       *
*  License for more details.                                   *
*                                                              *
*  You should have received a copy of the GNU Lesser           *
*  General Public License along with this library;             *
*  Inc., 59 Temple Place, Suite 330, Boston,                   *
*  MA 02111-1307 USA                                           *
*                                                              *
****************************************************************/

var isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1; var isMoz = document.implementation && document.implementation.createDocument; var isSafari = ((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false; function CurvyCorners()
{ if(typeof(arguments[0]) != "object") throw newCurvyError("First parameter of CurvyCorners() must be an object."); if(typeof(arguments[1]) != "object" && typeof(arguments[1]) != "string") throw newCurvyError("Second parameter of CurvyCorners() must be an object or a class name."); if(typeof(arguments[1]) == "string")
{ var startIndex = 0; var boxCol = getElementsByClass(arguments[1]);}
else
{ var startIndex = 1; var boxCol = arguments;}
var CurvyCornersCol = new Array(); if(arguments[0].validTags)
var validElements = arguments[0].validTags; else
var validElements = ["div"]; for(var i = startIndex, j = boxCol.length; i < j; i++)
{ var currentTag = boxCol[i].tagName.toLowerCase(); if(inArray(validElements, currentTag) !== false)
{ CurvyCornersCol[CurvyCornersCol.length] = new curvyObject(arguments[0], boxCol[i]);}
}
this.objects = CurvyCornersCol; this.applyCornersToAll = function()
{ for(var x = 0, k = this.objects.length; x < k; x++)
{ this.objects[x].applyCorners();}
}
}
function curvyObject()
{ this.box = arguments[1]; this.settings = arguments[0]; this.topContainer = null; this.bottomContainer = null; this.masterCorners = new Array(); this.contentDIV = null; var boxHeight = get_style(this.box, "height", "height"); var boxWidth = get_style(this.box, "width", "width"); var borderWidth = get_style(this.box, "borderTopWidth", "border-top-width"); var borderColour = get_style(this.box, "borderTopColor", "border-top-color"); var boxColour = get_style(this.box, "backgroundColor", "background-color"); var backgroundImage = get_style(this.box, "backgroundImage", "background-image"); var boxPosition = get_style(this.box, "position", "position"); var boxPadding = get_style(this.box, "paddingTop", "padding-top"); this.boxHeight = parseInt(((boxHeight != "" && boxHeight != "auto" && boxHeight.indexOf("%") === -1)? boxHeight.substring(0, boxHeight.indexOf("px")) : this.box.scrollHeight)); this.boxWidth = parseInt(((boxWidth != "" && boxWidth != "auto" && boxWidth.indexOf("%") === -1)? boxWidth.substring(0, boxWidth.indexOf("px")) : this.box.scrollWidth)); this.borderWidth = parseInt(((borderWidth != "" && borderWidth.indexOf("px") !== -1)? borderWidth.slice(0, borderWidth.indexOf("px")) : 0)); this.boxColour = format_colour(boxColour); this.boxPadding = parseInt(((boxPadding != "" && boxPadding.indexOf("px") !== -1)? boxPadding.slice(0, boxPadding.indexOf("px")) : 0)); this.borderColour = format_colour(borderColour); this.borderString = this.borderWidth + "px" + " solid " + this.borderColour; this.backgroundImage = ((backgroundImage != "none")? backgroundImage : ""); this.boxContent = this.box.innerHTML; if(boxPosition != "absolute") this.box.style.position = "relative"; this.box.style.padding = "0px"; if(isIE && boxWidth == "auto" && boxHeight == "auto") this.box.style.width = "100%"; if(this.settings.autoPad === true && this.boxPadding > 0)
this.box.innerHTML = ""; this.applyCorners = function()
{ for(var t = 0; t < 2; t++)
{ switch(t)
{ case 0:
if(this.settings.tl || this.settings.tr)
{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var topMaxRadius = Math.max(this.settings.tl ? this.settings.tl.radius : 0, this.settings.tr ? this.settings.tr.radius : 0); newMainContainer.style.height = topMaxRadius + "px"; newMainContainer.style.top = 0 - topMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.topContainer = this.box.appendChild(newMainContainer);}
break; case 1:
if(this.settings.bl || this.settings.br)
{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var botMaxRadius = Math.max(this.settings.bl ? this.settings.bl.radius : 0, this.settings.br ? this.settings.br.radius : 0); newMainContainer.style.height = botMaxRadius + "px"; newMainContainer.style.bottom = 0 - botMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.bottomContainer = this.box.appendChild(newMainContainer);}
break;}
}
if(this.topContainer) this.box.style.borderTopWidth = "0px"; if(this.bottomContainer) this.box.style.borderBottomWidth = "0px"; var corners = ["tr", "tl", "br", "bl"]; for(var i in corners)
{ if(i > -1 < 4)
{ var cc = corners[i]; if(!this.settings[cc])
{ if(((cc == "tr" || cc == "tl") && this.topContainer !== null) || ((cc == "br" || cc == "bl") && this.bottomContainer !== null))
{ var newCorner = document.createElement("DIV"); newCorner.style.position = "relative"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; if(this.backgroundImage == "")
newCorner.style.backgroundColor = this.boxColour; else
newCorner.style.backgroundImage = this.backgroundImage; switch(cc)
{ case "tl":
newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.tr.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.left = -this.borderWidth + "px"; break; case "tr":
newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.tl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; newCorner.style.left = this.borderWidth + "px"; break; case "bl":
newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.br.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = -this.borderWidth + "px"; newCorner.style.backgroundPosition = "-" + (this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break; case "br":
newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.bl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = this.borderWidth + "px"
newCorner.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break;}
}
}
else
{ if(this.masterCorners[this.settings[cc].radius])
{ var newCorner = this.masterCorners[this.settings[cc].radius].cloneNode(true);}
else
{ var newCorner = document.createElement("DIV"); newCorner.style.height = this.settings[cc].radius + "px"; newCorner.style.width = this.settings[cc].radius + "px"; newCorner.style.position = "absolute"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; var borderRadius = parseInt(this.settings[cc].radius - this.borderWidth); for(var intx = 0, j = this.settings[cc].radius; intx < j; intx++)
{ if((intx +1) >= borderRadius)
var y1 = -1; else
var y1 = (Math.floor(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow((intx+1), 2))) - 1); if(borderRadius != j)
{ if((intx) >= borderRadius)
var y2 = -1; else
var y2 = Math.ceil(Math.sqrt(Math.pow(borderRadius,2) - Math.pow(intx, 2))); if((intx+1) >= j)
var y3 = -1; else
var y3 = (Math.floor(Math.sqrt(Math.pow(j ,2) - Math.pow((intx+1), 2))) - 1);}
if((intx) >= j)
var y4 = -1; else
var y4 = Math.ceil(Math.sqrt(Math.pow(j ,2) - Math.pow(intx, 2))); if(y1 > -1) this.drawPixel(intx, 0, this.boxColour, 100, (y1+1), newCorner, -1, this.settings[cc].radius); if(borderRadius != j)
{ for(var inty = (y1 + 1); inty < y2; inty++)
{ if(this.settings.antiAlias)
{ if(this.backgroundImage != "")
{ var borderFract = (pixelFraction(intx, inty, borderRadius) * 100); if(borderFract < 30)
{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, 0, this.settings[cc].radius);}
else
{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, -1, this.settings[cc].radius);}
}
else
{ var pixelcolour = BlendColour(this.boxColour, this.borderColour, pixelFraction(intx, inty, borderRadius)); this.drawPixel(intx, inty, pixelcolour, 100, 1, newCorner, 0, this.settings[cc].radius, cc);}
}
}
if(this.settings.antiAlias)
{ if(y3 >= y2)
{ if (y2 === -1) y2 = 0; this.drawPixel(intx, y2, this.borderColour, 100, (y3 - y2 + 1), newCorner, 0, 0);}
}
else
{ if(y3 >= y1)
{ this.drawPixel(intx, (y1 + 1), this.borderColour, 100, (y3 - y1), newCorner, 0, 0);}
}
var outsideColour = this.borderColour;}
else
{ var outsideColour = this.boxColour; var y3 = y1;}
if(this.settings.antiAlias)
{ for(var inty = (y3 + 1); inty < y4; inty++)
{ this.drawPixel(intx, inty, outsideColour, (pixelFraction(intx, inty , j) * 100), 1, newCorner, ((this.borderWidth > 0)? 0 : -1), this.settings[cc].radius);}
}
}
this.masterCorners[this.settings[cc].radius] = newCorner.cloneNode(true);}
if(cc != "br")
{ for(var t = 0, k = newCorner.childNodes.length; t < k; t++)
{ var pixelBar = newCorner.childNodes[t]; var pixelBarTop = parseInt(pixelBar.style.top.substring(0, pixelBar.style.top.indexOf("px"))); var pixelBarLeft = parseInt(pixelBar.style.left.substring(0, pixelBar.style.left.indexOf("px"))); var pixelBarHeight = parseInt(pixelBar.style.height.substring(0, pixelBar.style.height.indexOf("px"))); if(cc == "tl" || cc == "bl"){ pixelBar.style.left = this.settings[cc].radius -pixelBarLeft -1 + "px";}
if(cc == "tr" || cc == "tl"){ pixelBar.style.top = this.settings[cc].radius -pixelBarHeight -pixelBarTop + "px";}
switch(cc)
{ case "tr":
pixelBar.style.backgroundPosition = "-" + Math.abs((this.boxWidth - this.settings[cc].radius + this.borderWidth) + pixelBarLeft) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "tl":
pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "bl":
pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs((this.boxHeight + this.settings[cc].radius + pixelBarTop) -this.borderWidth) + "px"; break;}
}
}
}
if(newCorner)
{ switch(cc)
{ case "tl":
if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "tr":
if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "bl":
if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break; case "br":
if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break;}
}
}
}
var radiusDiff = new Array(); radiusDiff["t"] = Math.abs(this.settings.tl.radius - this.settings.tr.radius)
radiusDiff["b"] = Math.abs(this.settings.bl.radius - this.settings.br.radius); for(z in radiusDiff)
{ if(z == "t" || z == "b")
{ if(radiusDiff[z])
{ var smallerCornerType = ((this.settings[z + "l"].radius < this.settings[z + "r"].radius)? z +"l" : z +"r"); var newFiller = document.createElement("DIV"); newFiller.style.height = radiusDiff[z] + "px"; newFiller.style.width = this.settings[smallerCornerType].radius+ "px"
newFiller.style.position = "absolute"; newFiller.style.fontSize = "1px"; newFiller.style.overflow = "hidden"; newFiller.style.backgroundColor = this.boxColour; switch(smallerCornerType)
{ case "tl":
newFiller.style.bottom = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.topContainer.appendChild(newFiller); break; case "tr":
newFiller.style.bottom = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.topContainer.appendChild(newFiller); break; case "bl":
newFiller.style.top = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.bottomContainer.appendChild(newFiller); break; case "br":
newFiller.style.top = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.bottomContainer.appendChild(newFiller); break;}
}
var newFillerBar = document.createElement("DIV"); newFillerBar.style.position = "relative"; newFillerBar.style.fontSize = "1px"; newFillerBar.style.overflow = "hidden"; newFillerBar.style.backgroundColor = this.boxColour; newFillerBar.style.backgroundImage = this.backgroundImage; switch(z)
{ case "t":
if(this.topContainer)
{ if(this.settings.tl.radius && this.settings.tr.radius)
{ newFillerBar.style.height = topMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.tl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.tr.radius - this.borderWidth + "px"; newFillerBar.style.borderTop = this.borderString; if(this.backgroundImage != "")
newFillerBar.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; this.topContainer.appendChild(newFillerBar);}
this.box.style.backgroundPosition = "0px -" + (topMaxRadius - this.borderWidth) + "px";}
break; case "b":
if(this.bottomContainer)
{ if(this.settings.bl.radius && this.settings.br.radius)
{ newFillerBar.style.height = botMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.bl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.br.radius - this.borderWidth + "px"; newFillerBar.style.borderBottom = this.borderString; if(this.backgroundImage != "")
newFillerBar.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (topMaxRadius + this.borderWidth)) + "px"; this.bottomContainer.appendChild(newFillerBar);}
}
break;}
}
}
if(this.settings.autoPad === true && this.boxPadding > 0)
{ var contentContainer = document.createElement("DIV"); contentContainer.style.position = "relative"; contentContainer.innerHTML = this.boxContent; contentContainer.className = "autoPadDiv"; var topPadding = Math.abs(topMaxRadius - this.boxPadding); var botPadding = Math.abs(botMaxRadius - this.boxPadding); if(topMaxRadius < this.boxPadding)
contentContainer.style.paddingTop = topPadding + "px"; if(botMaxRadius < this.boxPadding)
contentContainer.style.paddingBottom = botMaxRadius + "px"; contentContainer.style.paddingLeft = this.boxPadding + "px"; contentContainer.style.paddingRight = this.boxPadding + "px"; this.contentDIV = this.box.appendChild(contentContainer);}
}
this.drawPixel = function(intx, inty, colour, transAmount, height, newCorner, image, cornerRadius)
{ var pixel = document.createElement("DIV"); pixel.style.height = height + "px"; pixel.style.width = "1px"; pixel.style.position = "absolute"; pixel.style.fontSize = "1px"; pixel.style.overflow = "hidden"; var topMaxRadius = Math.max(this.settings["tr"].radius, this.settings["tl"].radius); if(image === -1 && this.backgroundImage != "")
{ pixel.style.backgroundImage = this.backgroundImage; pixel.style.backgroundPosition = "-" + (this.boxWidth - (cornerRadius - intx) + this.borderWidth) + "px -" + ((this.boxHeight + topMaxRadius + inty) -this.borderWidth) + "px";}
else
{ pixel.style.backgroundColor = colour;}
if (transAmount != 100)
setOpacity(pixel, transAmount); pixel.style.top = inty + "px"; pixel.style.left = intx + "px"; newCorner.appendChild(pixel);}
}
function insertAfter(parent, node, referenceNode)
{ parent.insertBefore(node, referenceNode.nextSibling);}
function BlendColour(Col1, Col2, Col1Fraction)
{ var red1 = parseInt(Col1.substr(1,2),16); var green1 = parseInt(Col1.substr(3,2),16); var blue1 = parseInt(Col1.substr(5,2),16); var red2 = parseInt(Col2.substr(1,2),16); var green2 = parseInt(Col2.substr(3,2),16); var blue2 = parseInt(Col2.substr(5,2),16); if(Col1Fraction > 1 || Col1Fraction < 0) Col1Fraction = 1; var endRed = Math.round((red1 * Col1Fraction) + (red2 * (1 - Col1Fraction))); if(endRed > 255) endRed = 255; if(endRed < 0) endRed = 0; var endGreen = Math.round((green1 * Col1Fraction) + (green2 * (1 - Col1Fraction))); if(endGreen > 255) endGreen = 255; if(endGreen < 0) endGreen = 0; var endBlue = Math.round((blue1 * Col1Fraction) + (blue2 * (1 - Col1Fraction))); if(endBlue > 255) endBlue = 255; if(endBlue < 0) endBlue = 0; return "#" + IntToHex(endRed)+ IntToHex(endGreen)+ IntToHex(endBlue);}
function IntToHex(strNum)
{ base = strNum / 16; rem = strNum % 16; base = base - (rem / 16); baseS = MakeHex(base); remS = MakeHex(rem); return baseS + '' + remS;}
function MakeHex(x)
{ if((x >= 0) && (x <= 9))
{ return x;}
else
{ switch(x)
{ case 10: return "A"; case 11: return "B"; case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F";}
}
}
function pixelFraction(x, y, r)
{ var pixelfraction = 0; var xvalues = new Array(1); var yvalues = new Array(1); var point = 0; var whatsides = ""; var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x,2))); if ((intersect >= y) && (intersect < (y+1)))
{ whatsides = "Left"; xvalues[point] = 0; yvalues[point] = intersect - y; point = point + 1;}
var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y+1,2))); if ((intersect >= x) && (intersect < (x+1)))
{ whatsides = whatsides + "Top"; xvalues[point] = intersect - x; yvalues[point] = 1; point = point + 1;}
var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x+1,2))); if ((intersect >= y) && (intersect < (y+1)))
{ whatsides = whatsides + "Right"; xvalues[point] = 1; yvalues[point] = intersect - y; point = point + 1;}
var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y,2))); if ((intersect >= x) && (intersect < (x+1)))
{ whatsides = whatsides + "Bottom"; xvalues[point] = intersect - x; yvalues[point] = 0;}
switch (whatsides)
{ case "LeftRight":
pixelfraction = Math.min(yvalues[0],yvalues[1]) + ((Math.max(yvalues[0],yvalues[1]) - Math.min(yvalues[0],yvalues[1]))/2); break; case "TopRight":
pixelfraction = 1-(((1-xvalues[0])*(1-yvalues[1]))/2); break; case "TopBottom":
pixelfraction = Math.min(xvalues[0],xvalues[1]) + ((Math.max(xvalues[0],xvalues[1]) - Math.min(xvalues[0],xvalues[1]))/2); break; case "LeftBottom":
pixelfraction = (yvalues[0]*xvalues[1])/2; break; default:
pixelfraction = 1;}
return pixelfraction;}
function rgb2Hex(rgbColour)
{ try{ var rgbArray = rgb2Array(rgbColour); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); var hexColour = "#" + IntToHex(red) + IntToHex(green) + IntToHex(blue);}
catch(e){ alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");}
return hexColour;}
function rgb2Array(rgbColour)
{ var rgbValues = rgbColour.substring(4, rgbColour.indexOf(")")); var rgbArray = rgbValues.split(", "); return rgbArray;}
function setOpacity(obj, opacity)
{ opacity = (opacity == 100)?99.999:opacity; if(isSafari && obj.tagName != "IFRAME")
{ var rgbArray = rgb2Array(obj.style.backgroundColor); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); obj.style.backgroundColor = "rgba(" + red + ", " + green + ", " + blue + ", " + opacity/100 + ")";}
else if(typeof(obj.style.opacity) != "undefined")
{ obj.style.opacity = opacity/100;}
else if(typeof(obj.style.MozOpacity) != "undefined")
{ obj.style.MozOpacity = opacity/100;}
else if(typeof(obj.style.filter) != "undefined")
{ obj.style.filter = "alpha(opacity:" + opacity + ")";}
else if(typeof(obj.style.KHTMLOpacity) != "undefined")
{ obj.style.KHTMLOpacity = opacity/100;}
}
function inArray(array, value)
{ for(var i = 0; i < array.length; i++){ if (array[i] === value) return i;}
return false;}
function inArrayKey(array, value)
{ for(key in array){ if(key === value) return true;}
return false;}
function addEvent(elm, evType, fn, useCapture) { if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true;}
else if (elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r;}
else { elm['on' + evType] = fn;}
}
function removeEvent(obj, evType, fn, useCapture){ if (obj.removeEventListener){ obj.removeEventListener(evType, fn, useCapture); return true;} else if (obj.detachEvent){ var r = obj.detachEvent("on"+evType, fn); return r;} else { alert("Handler could not be removed");}
}
function format_colour(colour)
{ var returnColour = "#ffffff"; if(colour != "" && colour != "transparent")
{ if(colour.substr(0, 3) == "rgb")
{ returnColour = rgb2Hex(colour);}
else if(colour.length == 4)
{ returnColour = "#" + colour.substring(1, 2) + colour.substring(1, 2) + colour.substring(2, 3) + colour.substring(2, 3) + colour.substring(3, 4) + colour.substring(3, 4);}
else
{ returnColour = colour;}
}
return returnColour;}
function get_style(obj, property, propertyNS)
{ try
{ if(obj.currentStyle)
{ var returnVal = eval("obj.currentStyle." + property);}
else
{ if(isSafari && obj.style.display == "none")
{ obj.style.display = ""; var wasHidden = true;}
var returnVal = document.defaultView.getComputedStyle(obj, '').getPropertyValue(propertyNS); if(isSafari && wasHidden)
{ obj.style.display = "none";}
}
}
catch(e)
{ }
return returnVal;}
function getElementsByClass(searchClass, node, tag)
{ var classElements = new Array(); if(node === null)
node = document; if(tag === null)
tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)"); for (i = 0, j = 0; i < elsLen; i++)
{ if(pattern.test(els[i].className))
{ classElements[j] = els[i]; j++;}
}
return classElements;}
function newCurvyError(errorMessage)
{ return new Error("CurvyCorners Error:\n" + errorMessage)
}

/**
* SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
*
* SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
*/
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
