
/**
 *
 * Methods for resizing the flash stage at runtime.
 *
 */
function setElementHeight(elementId, h){
	if(!canSizeElement(elementId))alert('Your Browser does not support this application');
	document.getElementById(elementId).style.height = h+"px";		
}
function setElementWidth(elementId, w){
	if(!canSizeElement(elementId))alert('Your Browser does not support this application');
	document.getElementById(elementId).style.width = w+"px";
}
function setElementSize(elementId, w, h){
	if(!canSizeElement(elementId))alert('Your Browser does not support this application');
	setFlashWidth(elementId, w);
	setFlashHeight(elementId, h);
}
function resetScroll(l,t){
	window.scrollTo(l,t);
}
function getDocumentHeight(){
	return ducument.height;
}

function pageScroll(a) {
    y = window.scrollY ;
    window.scroll(0, y + a );
}

function documentVisibleHeight() {
	 if (typeof window.innerWidth != 'undefined')  {
		  return window.innerHeight
	 } else if (typeof document.documentElement != 'undefined'
		 && typeof document.documentElement.clientWidth !=
		 'undefined' && document.documentElement.clientWidth != 0) {
		  return document.documentElement.clientHeight
	 } else {
		   return document.getElementsByTagName('body')[0].clientHeight
	 }
}
function canSizeElement(elementId){
	if(! document.getElementById (elementId)){
		alert('Your Browser has not detected '+elementId+' element');
		return false;
	}
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) {
			return true;
		}
		else if(parseInt(ua.substr(opera+6, 1)) >= 7){
			return true;
		}
	}
	return false;
}

function trackURL(url)
{
	try {
		pageTracker._trackPageview(url);
	} catch (e){
		if (console){
			console.log(e);
		}
	}	
	
}


