// Default JS Content - Do Not Delete

function popupPostcard(href,width,height,scroll)
	{
		postCard= window.open(href,'myPostcard','resizable=no,toolbar=no,left=200,top=200,status=no,location=no,height=' + height + ',width=' + width + ',scrollbars=' + scroll + "'");
	};


function spryMyLinks() 
	{
	var myDiv = document.getElementById('bionav');
	var aLinks=myDiv.getElementsByTagName('a');
	for(var i=0;i<aLinks.length;i++) 
		{
			var myCurrentItem = aLinks[i];
			//aLinks[i].setAttribute('onclick', 'pe.loadContent(this.href);return false;');
			if( myCurrentItem.attachEvent )
				{
				   myCurrentItem.setAttribute('name', myCurrentItem.href);
				   myCurrentItem.href = 'javascript: pe.loadContent("' + myCurrentItem.href + '")';				   
				} 
			else 
				{
				   myCurrentItem.setAttribute('name', myCurrentItem.href);
				   myCurrentItem.setAttribute('onClick', 'pe.loadContent(this.href);return false;');
				}
			
		}
	}

function spryMyNav()
{
if(document.getElementById('bionav'))
	{
	pe = new Spry.Widget.HTMLPanel("bioArea");	
	var mybDiv = document.getElementById('bionav');
	var bLinks=mybDiv.getElementsByTagName('a');
	var myFirstItem = bLinks[0];
	spryMyLinks();
/*Removed by ASR - uncomment if you want to show the first item automatically*/	
/*if ( (top.location.href) == (window.location.href) )
		{
		pe.loadContent(myFirstItem.name);
		}*/
	}
}

function omniturizeLinks(){
	var aLinks=document.getElementsByTagName('a');
	for(var q=0; q < aLinks.length; q++) {
		if(aLinks[q].href.length>0 && aLinks[q].href.toLowerCase().indexOf('ichotelsgroup.com') > 0)
			{
				aLinks[q].onclick=function(){addParamsAndRedirect(this.href);return false;};
			}
			
		}
	}

window.onload=omniturizeLinks;