﻿var CDN_PATH = "http://img.cdn-speed.com/philips/common/";

function $print(s) {
	if (s == null || s == "") return;
	document.write(s);
}

function $import(path, type){
	if (type == "css") {
		$print("<" + "link href=\"" + path + "\" rel=\"stylesheet\" type=\"text/css\"></" + "link>");
	} else {
		$print("<" + "script type=\"text/javascript\" src=\"" + path + "\"></" + "script>");
	}
}

function RCCLHeader(bg, height) {
	var height = height == null ? 140: height;
	var color;
	$print('<style type="text/css">');
	$print('body { background: url(' + bg + ') top center no-repeat ' + color + '; }');
	$print('</style>');
	$print('<div style="position: relative; width: 100%; height: ' + height + 'px; z-index: 999;">');
	$print('<div id="flashNav" style="position: absolute; width: 100%; height: 140px; overflow: hidden;"></div>');
	$print('</div>');
	
	$print('<div id="globalMsgDiv" style="position: absolute; width: 314px; height: 200px; display: none;">');
	$print('<div style="position: absolute; width: 314px; height: 200px; z-index: 1; background: url(images/msg.png); _background: ; _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src=\'images/msg.png\');"></div>');
	$print('<div style="position: absolute; z-index: 2;">');
	$print('<div id="globalLink" style="width: 51px; height: 23px; float: left; padding: 131px 0px 0px 90px;"><a href="#"><img src="images/msg_continue.gif" width="51" height="23" border="0" /></a></div>');
	$print('<div style="width: 51px; height: 23px; float: left; padding: 131px 0px 0px 40px;"><a href="#" onclick="hideGlobalMsg(); return false;"><img src="images/msg_cancel.gif" width="51" height="23" border="0" /></a></div>');
	$print('<div style="clear: both;"></div>');
	$print('</div>');
	$print('</div>');
	
	try {
	var pageTracker = _gat._getTracker("UA-11157213-1");
	pageTracker._trackPageview();
	} catch(err) {}
}

function resizeFlash(channel) {
	var channel = channel == null ? 'small' : channel;
	
	if (channel == 'small') {
		document.getElementById('flashNav').style.height = '140px';
	} else {
		document.getElementById('flashNav').style.height = '400px';
	}
}

function RCCLFooter(channel) {
	var nav = "nav.swf";
	if (channel == "home") {
		nav = "nav_home.swf";
	}
	$('#flashNav').flash(
		{ src: nav,
		width: '100%',
		height: '100%',
		wmode: 'transparent',
		flashvars: {back_url:escape(location)}
		},
		{ version: 8 }
	);
	$print('<div>');
	$print('<div align="center" style="padding: 20px 0px 5px 0px; font-size: 12px; font-family: 宋体;"><a href="http://www.iupop.com/showinfo.asp?id=1" target="_blank">公司简介</a>&nbsp;|&nbsp;<a href="http://www.iupop.com/showinfo.asp?id=7" target="_blank">公司地址</a>&nbsp;|&nbsp;<a href="http://www.iupop.com/showinfo.asp?id=2" target="_blank">服务中心</a>&nbsp;|&nbsp;<a href="http://www.iupop.com/showinfo.asp?id=9" onclick="showGlobalMsg(\'http://www.royalcaribbean.com/legal.do;jsessionid=0000PHqgmZZAdwrYXb1mEuGjCoa:12hbiocus?cS=MFTR\'); return false";>网站导航</a></div>');
	$print('<div align="center" style="padding: 0px 0px 5px 0px; font-size: 12px;">皇家加勒比国际游轮版权所有</div>');
	$print('<div align="center" style="padding: 0px 0px 5px 0px; font-size: 12px;">版权所有：北京神舟国际旅行社集团有限公司方庄门市</div>');
	$print('<div align="center" style="padding: 0px 0px 5px 0px; font-size: 12px;">神舟国旅24小时服务热线：010-67676067 4008154008 传真：010-67698903 E-mail：iupop@sina.com </div>');
	$print('<div align="center" style="padding: 0px 0px 5px 0px; font-size: 12px;">许可证号：L-bj-GJ00068  工商注册号：1101061861136</div>');
	$print('<div align="center" style="padding: 0px 0px 5px 0px; font-size: 12px;">『免责声明』：神舟国旅专业做旅游、非专业做网站，尊重知识产权，内容若涉及侵权请及时联系我们核实、删除。</div>');
	$print('<div align="center" style="font-size: 12px;"> 京ICP备10004081号</div> ');
	$print('<script src="http://s97.cnzz.com/stat.php?id=1985023&web_id=1985023&show=pic" language="JavaScript"></script>');
	$print('<div style="height: 10px;"></div>');
	$print('</div>');
}

function getAbsOffsetTop(obj) {
	var y = obj.offsetTop;
	while (obj = obj.offsetParent) y += obj.offsetTop;
	return y;
}

function getAbsOffsetLeft(obj) {
	var x = obj.offsetLeft;
	while (obj = obj.offsetParent) x += obj.offsetLeft;
	return x;
}

function showGlobalMsg(url) {
	$("#globalMsgDiv").css({"left": (document.documentElement.clientWidth - $('#globalMsgDiv').width()) / 2 + "px", "top": (document.documentElement.clientHeight - $('#globalMsgDiv').height()) / 2 + document.documentElement.scrollTop + "px"}).show();  
	$("#globalLink").html('<a href="' + url + '" target="_blank" onclick="hideGlobalMsg(\'http://www.royalcaribbean.com/\');return true;"><img src="images/msg_continue.gif" width="51" height="23" border="0" /></a>');
}

function hideGlobalMsg(url) {
	$("#globalMsgDiv").hide();
}


var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));



