<!--
var page_referer = document.referrer;
var page_url = window.location.href;
var user_referer_id = 0;
var php2html_url = '';
var province_id  = 0;
var city_id      = 0;
var sight_id     = 0;
var pic_id		 = 0;
var travel_category_id = 0;
var db_table_id  = 5;
var db_column_id = 0;
var to_user_id   = 0;
var parent_id = 0;
var u3 = 'http://www.lian114.com';

var bw = navigator.userAgent.toLowerCase();

if ( page_url.indexOf('action=pp') != -1 ) {
	window.blur();
}

// Checkbox Switcher
// return checked number and checked value string(like 3,5,9,11)
// Example: <input type=button value="switch" onClick="switchCheckbox('',form,form.C1)">
// Example: <input type=button value="switch" onClick="switchCheckbox('',form,"C1[]")">
// Write by Macro Zeng macroz@gmail.com http://www.dyddy.com
function switchCheckbox(type,f,o)	{
    var checked_ary = Array(0,'');
    if ( typeof(o) == "object" )	{
        switch (type) {
            case 'all' :
            for ( i=0; i<o.length; i++ )	{
                o[i].checked = true;
            }
            break;
            case 'empty' :
            for ( i=0; i<o.length; i++ )	{
                o[i].checked = false;
            }
            break;
            case 'switch' :
            for ( i=0; i<o.length; i++ )	{
                o[i].checked = !o[i].checked;
            }
            break;
        }
        for ( i=0; i<o.length; i++ )	{
            if ( o[i].checked == true )	{
                checked_ary[0]++;
                checked_ary[1] += f.elements[i].value + ',';
            }
        }
    } else {
        switch (type) {
            case 'all' :
            for ( i=0; i<f.elements.length; i++ )	{
                if ( f.elements[i].type == 'checkbox' && f.elements[i].name.indexOf(o) != -1)	{
                    f.elements[i].checked = true;
                }
            }
            break;
            case 'empty' :
            for ( i=0; i<f.elements.length; i++ )	{
                if ( f.elements[i].type == 'checkbox' && f.elements[i].name.indexOf(o) != -1)	{
                    f.elements[i].checked = false;
                }
            }
            break;
            case 'switch' :
            for ( i=0; i<f.elements.length; i++ )	{
                if ( f.elements[i].type == 'checkbox' && f.elements[i].name.indexOf(o) != -1 )	{
                    f.elements[i].checked = !f.elements[i].checked;
                }
            }
            break;
        }
        for ( i=0; i<f.elements.length; i++ )	{
            if ( f.elements[i].type == 'checkbox' && f.elements[i].name.indexOf(o) != -1 && f.elements[i].checked == true )	{
                checked_ary[0]++;
                checked_ary[1] += f.elements[i].value + ',';
            }
        }
    }
    if ( checked_ary[1] != '' )	{
        checked_ary[1] = checked_ary[1].substr(0, checked_ary[1].length-1);
    }
    return checked_ary;
}

// 鼠标移动改变<tr>背景颜色
var old_bc = "";
function trOn(t) {
	old_bc = t.bgColor;
	t.bgColor = "#FADFC7";
}
function trOut(t) {
	t.bgColor = old_bc;
}

function numSelectBox(start_num, end_num, box_name, selected_value)	{
	document.write('<select name="'+box_name+'">');
	for ( i=start_num; i<=end_num; i++ )	{
		selected_str = ( i == selected_value ) ? ' selected' : '';
		document.write('<option value="'+i+'"' + selected_str + '>'+i+'</option>');
	}
	document.write('</select>');
}

// 可视化编辑器代码 开始
function setEditorConfig()  {
    config = new HTMLArea.Config(); // create a new configuration object
    config.height = '300px';
	//config.width = '100%';
    config.editorURL = 'http://www.izy.cn/script/html_area/';
    config.popupURL = 'http://www.izy.cn/script/html_area/popups/';
    
}

function initEditor(t) {
	if ( typeof(config) == "undefined" ||  config == null )	{
		//alert('可视化编辑器还没有载入完全，请稍后再试');
	} else {
		if(typeof(my_editor_ary)!= "undefined" && my_editor_ary != null)	{
			i = my_editor_ary.length;
		} else {
			my_editor_ary = new Array();
			my_editor_id_ary = new Array();
			i = 0;
		}
		my_editor_id_ary[i] = t.id;
		my_editor_ary[i] = new HTMLArea(t.id, config);
		my_editor_ary[i].generate();
	}
}

function getEditorValue()  {
    if(typeof(my_editor_ary)!= "undefined" && my_editor_ary != null)	{
        for (i = my_editor_ary.length; i > 0; i--)	{
            document.getElementById(my_editor_id_ary[i-1]).value = my_editor_ary[i-1].getHTML();
            //alert(my_editor_id_ary[i-1]);
        }
    }
}
// 可视化编辑器代码 结束

// ################### 下面是 Read variables passed with the URL 代码  ################### 

// url example: 
// index.html?tW=300&tD=toc.html&mD=pguide0701.html

//Set errorhandler
window.onerror = stopError

//Suppress JavaScript errors
function stopError() {
	return true;
}
//getFrameVars function
function getFrameVars() 
{ 
    var fVars     = new Object();       // Create new fVars object
    var nameVal   = "";                 // Holds array for a single name-value pair
    var inString  = location.search;    // Get query string from URL
    var separator = ",";                // Character used to separate multiple values 

   // If URL contains query string 
	if (inString.charAt(0) == "?") 
    { 
        // Removes "?" character from query string. 
        inString = inString.substring(1, inString.length); 
        // Separates query string into name-value pairs. 
		keypairs = inString.split("&"); 
        // Loops through name-value pairs. 
        for (var i=0; i < keypairs.length; i++) 
		{ 
            // Splits name-value into array (nameVal[0]=name, nameVal[1]=value). 
            nameVal = keypairs[i].split("=");
            // Checks to see if name already exists 
			if (fVars[nameVal[0]]) 
            { 
			   fVars[nameVal[0]] += separator + nameVal[1]; 
            } 
            else 
            { 
               fVars[nameVal[0]] = nameVal[1]; 
            }
        } 
    } 
	return fVars; 
} 
FrameVars=getFrameVars();

//Read variables passed with the URL
//alert("\n\nid=" + FrameVars.id + "\n\ntable=" + FrameVars.table + "\n\nurl=" + FrameVars.url + "\n\nlocation.search=" +  location.search);


//################### cookie start ################### 
// opener.reply.usericon.selectedIndex=\''+i+'\';alert(opener.reply.usericon.selectedIndex);"

function getCookieVal(offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {  
	var arg = name + "=";  
	var alen = arg.length;  
	var clen = document.cookie.length;  
	var i = 0;  
	while (i < clen) {    
	var j = i + alen;    
	if (document.cookie.substring(i, j) == arg)      
	return getCookieVal (j);    
	i = document.cookie.indexOf(" ", i) + 1;    
	if (i == 0) break;   
	}  
	return null;
}
function SetCookie (name, value) { 
	var exp1 = new Date(); 
	exp1.setTime(exp1.getTime() + (30*24*60*60*1000));
	var argv = SetCookie.arguments;  
	var argc = SetCookie.arguments.length;  
	var expires = (argc > 2) ? argv[2] : exp1;  
	var path = (argc > 3) ? argv[3] : '/';  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? argv[5] : false;  
	document.cookie = name + "=" + escape (value) + 
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
	((path == null) ? "" : ("; path=" + path)) +  
	((domain == null) ? "; domain=.lian114.com" : ("; domain=" + domain)) +    
	((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {  
	var exp = new Date();  
	exp.setTime (exp.getTime() - 1);  
	var cval = GetCookie (name);  
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

//################### cookie end ###################

function randomValue(low, high) {
	return (Math.floor(Math.random() * (1 + high - low) + low));
}

function last_modified_date()	{
	last_modified_date = new Date(document.lastModified);
	return ""+last_modified_date.getYear()+"年"+(last_modified_date.getMonth()+1)+"月"+last_modified_date.getDate()+"日"+last_modified_date.getHours()+"点"+last_modified_date.getMinutes()+"分"+last_modified_date.getSeconds()+"秒"; 
}

document.write('<style>A.blue:link,A.blue:visited {color: blue;}A.blue:hover {color: red;}A.red:link,A.red:visited {color:red;}A.red:hover {color: #DD0000;}.s_img_bg {width:119px;height:95px;text-align:center;background: url("http://www.izy.cn/image/share/s_img_bg.gif");background-repeat: no-repeat;}.img_bd1 {border: 2px solid #E2E2E2;}.s_img_ft{filter : progid:DXImageTransform.Microsoft.Shadow ( enabled=t , color=#E2E2E2 , direction=135 , strength=5);border:1px solid #CCCCCC;}.input2{height:20px;FONT-SIZE: 12px; background-color: #F9FFFB; border:#ABEFAD 1px solid;}.butn2{height:20px;FONT-SIZE: 12px; background-color: #E8FFE8; border:#ABEFAD 1px solid;}.butn{ font-size: 14px;background-image: url(http://product.it168.com/detail/images/85x23.gif);text-align: center; height: 23px;width: 83px;border: 0px;padding-left: 7px;padding-top:2px;}</style><link rel="icon" href="http://pic.izy.cn/favicon.ico" type="image/x-icon" /><link rel="shortcut icon" href="http://pic.izy.cn/favicon.ico" type="image/x-icon" /><body oncontextmenu="return onRightClick();" onselectstart="return onRightClick();">');

function top_ad()	{
	var exp1 = new Date(); 
	exp1.setTime(exp1.getTime() + (60*60*1000));
	if ( page_url.indexOf('top_url=') != -1 )	{
		top_iframe_url = unescape(FrameVars.top_url);
		if ( top_iframe_url.indexOf('http://') == 0 )	{
			SetCookie("top_iframe_url",top_iframe_url,exp1);
		}
	}
	if ( page_url.indexOf('bottom_url=') != -1 )	{
		bottom_iframe_url = unescape(FrameVars.bottom_url);
		if ( bottom_iframe_url.indexOf('http://') == 0 )	{
			SetCookie("bottom_iframe_url",bottom_iframe_url,exp1);
		}
	}

	top_iframe_url	= GetCookie("top_iframe_url");
	if ( top_iframe_url==null || top_iframe_url.indexOf('http://') != 0 )		{
		top_iframe_url	= u3+'/main/iframe/top.jspl';
		if ( page_url.indexOf('forecast') != -1 ) {
			top_iframe_url	= u3+'/main/iframe/en_top.html';
		}
		
		document.write('<center><div style="position:relative;left:0px;top:0px; z-index:1"><div style="position:absolute;left:185px;top:0px;z-index:2;" id=top_banner_ad></div><iframe src='+top_iframe_url+' width=760 height=120 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center></iframe></div></center>');
	} else {
		document.write('<center><iframe src='+top_iframe_url+' width=760 height=120 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center></iframe></center>');
	}
	default_word = '';
	default_aiqing_id = '';

}


function right_ad(ad_type)	{
	if ( typeof(ad_type) == "undefined" ||  ad_type == null )	{
		ad_type = 'all';
	} 
	right_iframe_url	= GetCookie("right_iframe_url");
	if ( right_iframe_url==null || right_iframe_url.indexOf('http://') != 0 )		{
		right_iframe_url	= 'http://www.izy.cn/php/right_iframe.php?province_id='+province_id+'&city_id='+city_id+'&sight_id='+sight_id+'&ad_type='+ad_type;
	}
	if (bw.indexOf('firefox')!=-1 || bw.indexOf('netscape')!=-1)	{
		h = 500;
	} else {
		h = '100%';
	}
	document.write('<center><iframe src='+right_iframe_url+' width=100% height='+h+' marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center></iframe></center>');
}

function banner_ad()	{

	document.write('<center><a href="http://www.hbcms.com/" target=_blank>免费的PHP建站系统<br><img src=http://www.hbcms.com/image/logo/hbcms_126_60.gif width=126 height=60 border=0></a><p><a href="mailto:my@1a.cn">本位置广告招商</a></center>');
}


//bottom_ad('几分钟调用程序一次|默认360分钟','调用结束hour|默认24点','调用开始hour|默认0点')
function bottom_ad()
{

	my_pv			= GetCookie("my_pv");
	nickname		= GetCookie("NICKNAME");
	login_name		= GetCookie("LOGIN_NAME");
	user_id			= GetCookie("USER_ID");
	cookie_ybi		= GetCookie("TRAVEL_MONEY");
	LOGIN_ALREADY	= GetCookie("LOGIN_ALREADY");

	//######### 调用程序代码开始 ##########
	var now = new Date();
	var last_modified = new Date(document.lastModified);
	var argv = bottom_ad.arguments;  
	var argc = bottom_ad.arguments.length;  
	var min = (argc > 0) ? parseInt(argv[0]) : 60*6;
	var end_hour = (argc > 1) ? parseInt(argv[1]) : 24; 
	var star_hour = (argc > 2) ? parseInt(argv[2]) : 0; 
	var iframe_w = iframe_h = 1;
	if (php2html_url.indexOf("create_question_list_page.php") != -1 )	{
		min=4;
	}
	if ( min<5 )	{
		iframe_w = 300;
		iframe_h = 100;
	}
	if ( php2html_url.indexOf(".php") != -1 )	{
		if ( now.getTime() > (last_modified.getTime()+min*60*1000) && now.getHours() < end_hour && now.getHours() >= star_hour )	{
			document.write('...<iframe src="' + php2html_url + '&mod=create_myself&location=2" border=0 width="'+iframe_w+'" height="'+iframe_h+'" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" name="php2html_iframe"></iframe>');
		}
	}

	bottom_iframe_url	= GetCookie("bottom_iframe_url");
	if ( bottom_iframe_url==null || bottom_iframe_url.indexOf('http://') != 0 )		{
		bottom_iframe_url	= '/main/iframe/bottom.html';
		if ( page_url.indexOf('forecast') != -1 ) {
			bottom_iframe_url	= u3+'/main/iframe/en_bottom.html';
		}
	} else {
		if ( page_url.indexOf('forecast') == -1 ) {
			document.write('<center>您目前看到的页面是 链123 的频道合作伙伴提供的，如果您需要恢复 链123 的默认风格，请进入<a href=/main/hz.html class=blue>频道合作</a>页面</center><BR>&nbsp;<BR>');
		}
	}

	if ( page_url.indexOf('forecast') != -1 ) {
		document.write('<center>Last Modified Date: ' + now + '</center><BR>&nbsp;<BR>');
	} else {
		document.write('<center>本页数据采集时间截至到' + last_modified_date() + '</center><BR>&nbsp;<BR>');
	}

	document.write('<center><iframe src='+bottom_iframe_url+' width=760 height=300 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no align=center></iframe></center>');

	// referer info
	document.write('<iframe src="about:blank" width=0 height=0 name=hidden_iframe></iframe>');

	if ( LOGIN_ALREADY == null) {
		setTimeout("get_referer_info()",5000);
	}



	if ( page_referer.indexOf('265.com') != -1 || page_referer.indexOf('action=pp') != -1 || page_url.indexOf('best_sight') != -1)	{
		//cheshi
		//document.write('<scr'+'ipt src="http://online.265.com/cn/1/66245.php"></sc'+'ript>');
	}
	
	// from search engine
	if ( page_referer.indexOf('baidu') != -1 || page_referer.indexOf('google') != -1 || page_referer.indexOf('3721') != -1 || page_referer.indexOf('sogou') != -1 || page_referer.indexOf('yisou') != -1 )	{	
		
		window.focus();
	}


	// ########### 统计代码开始 #############
	m_tc_server="vip7.t2t2.com";
	m_tc_website="106152";
	m_tc_parent_website="0";
	m_tc_style="2";

	function SetCookie_taiji(sName, sValue, timeKeep)
	{
		var now=new Date();
		var expireTime= new Date(now.valueOf()+timeKeep*60000*60);
		document.cookie = sName + "=" + escape(sValue) + "; path=/; expires=" + expireTime.toGMTString() + ";";
	}

	function GetCookie_taiji(sName)
	{
		var aCookie = document.cookie.split("; ");
		for (var i=0; i < aCookie.length; i++)
		{
			var aCrumb = aCookie[i].split("=");
			if (sName == aCrumb[0]) 
				return unescape(aCrumb[1]);
		}
		return null;
	}

	function GetCurrentDateTime()
	{
		var date = new Date();
		var current=new String("");
		current += date.getFullYear()+"-";
		current += date.getMonth() + 1+"-";
		current += date.getDate()+" ";
		current += date.getHours()+":";
		current += date.getMinutes()+":";
		current += date.getSeconds();
		return current;
	}

	m_tc_parent_website=m_tc_parent_website=="0"?m_tc_website:m_tc_parent_website;
	//	Cookie名称
	var m_tc_cookie_unique="tc_total_cookie_"+m_tc_website;
	var m_tc_cookie_all_uniquee="tc_total_cookie_parent_"+m_tc_parent_website;
	var m_tc_cookie_datetime="tc_total_cookie_datetime_"+m_tc_website;
	// 是否唯一用户；24小时算一次
	var m_tc_unique_user;
	var m_tc_all_unique_user;
	if (GetCookie_taiji(m_tc_cookie_unique)==null)
	{
		m_tc_unique_user="1";
		SetCookie_taiji(m_tc_cookie_unique,"1",24);
	}
	else
		m_tc_unique_user="0";
	if (GetCookie_taiji(m_tc_cookie_all_uniquee)==null)
	{
		m_tc_all_unique_user="1";
		SetCookie_taiji(m_tc_cookie_all_uniquee,"1",24);
	}
	else
		m_tc_all_unique_user="0";
	// 访问时间
	var m_tc_datetime=GetCookie_taiji(m_tc_cookie_datetime);
	SetCookie_taiji(m_tc_cookie_datetime,GetCurrentDateTime(),365*24);
	if (m_tc_datetime==null)
		m_tc_datetime="";

	// 统计代码
	document.write("<iframe src=\"http://"+m_tc_server+"/log.htm?website_id="+m_tc_website+"&unique="+m_tc_unique_user+"&all_unique="+m_tc_all_unique_user+"&dpi="+escape(screen.width)+"*"+escape(screen.height)+"&jsversion=&color="+escape(screen.colordepth)+"&language="+escape(navigator.browserLanguage)+"&location="+escape(location.href)+"&refer="+escape(document.referrer)+"&datetime="+escape(m_tc_datetime)+"\" style=\"display:none;width:0;height:0;\"></iframe>");

	// ########### tj统计代码结束 #############

}




if ( page_url.indexOf('action=pp') != -1 ) {
	window.blur();
} else {
	// 禁止非许可的嵌套
	if ( top.location != self.location && page_referer != '' && page_referer.indexOf('lian114') == -1 )	{
		top.location = self.location;
		window.focus();
	}
	if ( top.location == self.location)	{
		// 自动最大化网页，以获得最佳浏览效果
		if ( screen.availWidth > 1000 && document.documentElement.offsetWidth < 1010 )	{
			self.moveTo(-4,-4);
			self.resizeTo(screen.availWidth+7,screen.availHeight+8);
			document.body.style.cssText="overflow-x:hidden;";
		}else if ( screen.availWidth < 1000 && document.documentElement.offsetWidth < 750 )	{
			self.moveTo(-3,-3);
			self.resizeTo(screen.availWidth+5,screen.availHeight+6);
		}
	}
}

function aiqingDetailImg()	{
	document.write('<img src=http://www.iecool.com/uppic/2005-6/rose/rose1_024.jpg width=130 align=absmiddle>');
	return true;
}
function addUserLink(t,add_title,add_type)	{
	d=parent.document;
	t.href = 'http://user.izy.cn/php/user_link.php?province_id=' + province_id + '&city_id=' + city_id + '&sight_id=' + sight_id + '&link_url='+escape(d.location.href)+'&link_name='+add_title+'&link_type='+add_type+'&action=from_web';
	return true;
}
function uploadPic(t)	{
	t.href = 'http://user.izy.cn/php/pic_add.php?province_id=' + province_id + '&city_id=' + city_id + '&sight_id=' + sight_id + '&url='+window.location.href+'';
	return true;
}
function noPic()	{
	document.write('图片暂缺<br><A HREF="#" onclick="return uploadPic(this);" target=_blank>欢迎上传</a>');
}

//添加购物车
function add2cart(item_type,item_id) {
	location.href="http://user.izy.cn/php/shop_cart.php?item_type=" + item_type + "&item_id=" + item_id;
	//alert("暂未开通，敬请关注！");
	return true;
}

// 检查会员级别

function onRightClick()	{
	login_name = GetCookie("LOGIN_NAME");
	if ( login_name == null || login_name == '' )	{
		//alert("对不起，由于您还不是本站的会员，无法右键点击网站或复制网页文字！\n\n请先免费注册成为网站的会员，谢谢！");
		//window.open("http://user.izy.cn/php/register.html");
		//return false;
	}
	return true;
}

// 去过，想去 这里
function alreadyGone(t,gone)	{
	if ( gone == 1 ) {
		t.href = 'http://user.izy.cn/php/already_gone.php?' 
	} else {
		t.href = 'http://user.izy.cn/php/travel_notes_add.php?type=3&';
	}

	t.href += 'province_id=' + province_id + '&city_id=' + city_id + '&sight_id=' + sight_id + '&url='+page_url+'';

	return true;
}

// 我有关于XX的问题
function addQuestion(t)	{

	t.href = 'http://user.izy.cn/php/add_question.php?province_id=' + province_id + '&city_id=' + city_id + '&sight_id=' + sight_id + '&url='+page_url+'';

	return true;
}

// 发送图片到手机
function pic2phone(t,pic_url)	{
	pic_url = pic_url.replace('/big/','/middle/');
	pic_url = pic_url.replace('/small/','/middle/');
	if (pic_url.indexOf('http://') == -1 )	{
		pic_url += 'http://pic.izy.cn/';
	}
	t.href = 'http://search.caishow.com:8080/caixiu/setcliper.jsp?f=418&imageurl='+pic_url+'&strNotify=&strTitle=';
	t.target = '_blank';
	return true;
}

//添加留言的表单
function feedbackForm(aiqing_id)	{
	login_name		= GetCookie("LOGIN_NAME");
	LOGIN_ALREADY	= GetCookie("LOGIN_ALREADY");
	var feedback_note = '';
	if ( LOGIN_ALREADY != null && LOGIN_ALREADY != '' && login_name != '') {
		feedback_note = '<a href=/php/index.php target=_blank class=blue>您的身份是 ' + login_name + '</a>';
	} else {
		feedback_note = '<a href=/php/login.html target=_blank class=blue>您的身份是匿名游客，也可发表评论。免费注册后，将方便查询修改您的爱情宣言!</a> <a href=/php/register.html target=_blank class=blue>免费注册</a> <a href=/php/login.html target=_blank class=blue>登陆</a>';
	}
	var s = '<a name=feedback_form></a><TABLE align="center" cellSpacing=0 cellPadding=0 width="750" border=0><FORM METHOD=POST ACTION="/php/user_feedback.php" name=feedback_form target=_blank onsubmit="return checkFeedbackForm(this);"><tr><td align="center"><font color=green>对此爱情宣言发表评论：</font><input NAME="content" size=78 class=input2><input type=hidden name=aiqing_id value="'+aiqing_id+'" > <INPUT TYPE="submit" name=feedback_submit_button value="立刻发表" class=butn2><BR><BR><font color=red>* '+feedback_note+'</font></td></tr></FORM></table>';
	document.write(s);
}

function checkFeedbackForm(form) {
	if (form.content.value == "" || form.content.value.length > 250) {
		alert("留言内容不能超过250个字符(125个汉字)");
		form.content.focus();
		return false;
	}
	form.feedback_submit_button.disabled = true;
	return true;
}


// 收藏当前网页
function add2favorite(url, title)	{
	if ( typeof(url) == "undefined" )	{
		url = page_url;
		title = window.document.title;
	}
	window.external.addFavorite(url,title);
	return true;
}

// 记录会员介绍ID referer_id
function get_referer_info()	{
	if ( page_referer.indexOf('http') != -1 && page_referer.indexOf('lian114') == -1 )	{
		referer_url = GetCookie('referer_url');
		if ( referer_url == null || referer_url == '')	{
			SetCookie('referer_url',page_referer);
		}
	}
	if ( page_url.indexOf("referer_id=") != -1 && page_referer.indexOf('baidu') == -1 )	{
		user_referer_id = FrameVars.referer_id;
		SetCookie('referer_id',user_referer_id);

		additive_url = '';
	}
}


// 自动 COPY 代码开始
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function JM_cc(ob){
	var obj=MM_findObj(ob); if (obj) { 
	obj.select();js=obj.createTextRange();js.execCommand("Copy");}
	alert("已经复制成功，你可以粘贴到其他网站的论坛，或用QQ，EMAIL发送给您的朋友！");
}
// 自动 COPY 代码结束
function get_ybi_code(name)	{
	var gg_url = page_url;
	var ybi_code = '';
	var tt = window.document.title;
	tt = tt.replace('爱自由旅游网','');
	tt = tt.replace('www.izy.cn','');
	tt = tt.replace('izy.com','');
	if ( user_id != null )	{
		var url_ary = page_url.split('?');
		gg_url = url_ary[0] + '?referer_id=' + user_id;
	}
	ybi_code = '<BR>&nbsp;<BR><img src=http://img.qq.com/icon/icon39.gif width=20 height=20 align=absmiddle><font color=red>快速赚取旅游币</font>：将下面代码粘贴到其他网站的论坛，或用QQ，EMAIL发送给您的朋友，每个点击你都可以赚到1旅游币！(24小时重复IP点击除外)<BR><textarea name="'+name+'" onClick=JM_cc("'+name+'") rows=2 cols=85 style="color:black;">'+tt+'\r'+gg_url+'\r\r[url='+gg_url+']'+tt+'[/url]\r\r</textarea> <input type="button" name="Button"  id=butn value="复制代码" onClick=JM_cc("'+name+'")><BR>&nbsp;';

	return ybi_code;
}



//-->