
//Global Variables--------------------------------------------------->
	var myWidth = 0;
	var myHeight = 0;
	
	var IE = document.all?true:false
		
	var posX = 0;
	var posY = 0;
	
	var loadState=0;
	
	var currTtp;
	var showTtp=false;
//Global Variables---------------------------------------------------|



//Initialize Variables----------------------------------------------->
	getWH();

//Initialize Variables-----------------------------------------------|


window.onload=function()
{
				
	commonFunctionsAfterLoad();
	
}



window.onresize=function()
{
	
	afterResized();
	
}




window.addEvent('domready', function(){
		
	if(loadedPage!='')loadPageFunction();
	
});




function divColorChange(divId,fromcol,tocol)
{
	
	// We are setting the opacity of the element to 0.5 and adding two events
	$(divId).set('opacity', 1).addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({			    
				'opacity': 1,
				'background-color': fromcol,
				'color': tocol
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				opacity: 1,
				backgroundColor: tocol,
				color: fromcol
			});
		}
	});
}




function expandDiv(divid,fromhth,tohth)
{			
	divColorChange(divid,'#CC6666','#F6F6F6');
	
	$(divid).addEvents({
		'click': function(){
			
			if(this.style.height!=fromhth+'px')
			{								
				this.set('tween', {
					duration: 300,
					transition: Fx.Transitions.Bounce.Out // This could have been also 'bounce:out'
				}).tween('height', fromhth+'px');
				
				
				$(prevDiv).set('tween', {
				duration: 300,
					transition: Fx.Transitions.Bounce.Out				
				}).tween('height', tohth+'px');
				
				prevDiv=divid;/////***
			}
			
		}
		
	});
		
}

