﻿//alert()
onLoadArr = new Array;
function onLoadPage(){
	var n
	for(n=0;n<onLoadArr.length; n++){
		objType = typeof(onLoadArr[n])
		if(objType=="string"){
			eval(onLoadArr[n])	
		}else if(objType == "function"){
			onLoadArr[n]()
		}
	}
	
	
}

var onFbLoadArr = new Array;
var onFbLoad = function(){
	var n
	for(n=0;n<onFbLoadArr.length; n++){
		objType = typeof(onFbLoadArr[n])
		if(objType=="string"){
		//	eval(onFbLoadArr[n])	
		}else if(objType == "function"){
			onFbLoadArr[n]()
		}
	}
}

var agt,MSIE
agt=navigator.userAgent.toLowerCase();
NAV = agt.indexOf('netscape')!=-1
FFOX=agt.indexOf('firefox')!=-1
MSIE =agt.indexOf('msie')!=-1


function deleteNode( nodeObj){
	inOb = nodeObj.parentNode
	try{
		inOb.removeChild(nodeObj)
	}catch(e){
		try{
			nodeObj.removeMe(true)	
		}catch(e){
			try{
				nodeObj.removeNode(true)
			}catch(e){
				return false
			}
		}		
	}
	return true
}

var popstageS
function WOpener(lnk,winwid ,winhigh,scrol,resize ){
	
	if(resize==null)resize=0
	if(scrol==null)scrol=0
	if(popstageS!=null){popstageS.close();}
	if(winwid==null){winwid = 100}
	if(winhigh==null){winhigh=100}
	popstageS =   window.open(lnk,'tour', 'width='+winwid+',height='+winhigh+',scrollbars='+scrol+',left=50,top=20,menubar=0,location=0,toolbar=0,status=0,resizable='+resize)
	
	sti=setTimeout("WOpenerCheck()",500)

}
flashShow=function(w,h,s,name){
	if(name==null)name="fl999"
	document.write( '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \
			   			codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+w+'" height="'+h+'" id="'+name+'" align="middle">'+
		'<param name="allowScriptAccess" value="sameDomain" >'+
	'<param name="movie" value="'+s+'" >'+
	'<param name="menu" value="false" >'+
	'<param name="quality" value="high" >'+
	'<param name="wmode" value="transparent" >'+
	'<param name="bgcolor" value="#ffffff" >'+
	'<param name="allowFullScreen" value="true" >'+
	'<embed src="'+s+'" menu="false" quality="high"  allowFullScreen="true" wmode="transparent" bgcolor="#ffffff" width="'+w+'" height="'+h+'" name="'+name+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" >'+
	'</object>')
}

function getFlashMovie(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}

function getWinDimentions(){
	 myBodyWidth = 790
	 myBodyHeight = 490;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myBodyWidth = window.innerWidth;
		myBodyHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myBodyWidth = document.documentElement.clientWidth;
		myBodyHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myBodyWidth = document.body.clientWidth;
		myBodyHeight = document.body.clientHeight;
	}
	return [myBodyWidth, myBodyHeight]
	
	
}

function resizeWindowToScreen(){
	WW=self.screen.width
	WH =self.screen.height
	if(WW<750)WW=750
	if(WH<550)WH=550
	window.moveTo(0,0)
	window.resizeTo(WW,WH)
	
	
}
function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}
function trace(p){
		try{
			console.log(p)
		} catch(e){}	
		
}
