var nextpage;
var ua = navigator.userAgent;

function getSwf(id)
{
	if (navigator.appName.indexOf("Microsoft") != -1) return window[id];
	else return document[id];
}

function transition(page)
{
	nextpage = page;
	getSwf("bg").sendEraseInstToSwf();
}

function sendEraseFinishedEventToJs()
{
	document.getElementById('flasharea').style.zIndex = 3;
	
	getSwf("bg").sendOutroInstToSwf();
}

function sendOutroFinishedEventToJs()
{
	location.href = nextpage;
}


function sendWrapLayerShowToJs()
{
	   document.getElementById('wrap').style.display = 'block';
}

function sendWrapLayerHideToJs()
{
	   document.getElementById('wrap').style.display = 'none';
}


var jumpTimer;

function sendWrapLayerBehindToJs()
{
	document.getElementById('flasharea').style.zIndex = 1;
	document.getElementById('flasharea').style.background = 'none';
	if (document.URL.indexOf('/information/#') > 0)
	{
		jumpTimer = setTimeout(operaaaaa, 100);
		/*****
		var token = document.URL.split('#');
		location.href = '#'+token[1];
//		location.hash = token[1];
		*****/
	}
}



function operaaaaa()
{
	var token = document.URL.split('#');
	location.href = '#'+token[1];
//	location.hash = token[1];
	clearTimeout(jumpTimer);
}



function userAgent()
{
	return ua;
}
