function cBorder(cc123,channelType)
{
    if( channelType == "" )
    {
	cc123.style.borderColor = '#d4a2b5';
	}
	    if( channelType == "2" )
    {
	cc123.style.borderColor = '#93a6b4';
	}
	    if( channelType == "3" )
    {
	cc123.style.borderColor = '#c8d4a2';
	}
}
function dBorder(cc123,channelType)
{
    if( channelType == "" )
    {
	cc123.style.borderColor = '#ECD6DF';
	}
	if( channelType == "2" )
    {
	cc123.style.borderColor = '#dee2e5';
	}
	if( channelType == "3" )
    {
	cc123.style.borderColor = '#d9dfc7';
	}
}
function c(cc,channelType)
{
    if( channelType == "" )
    {
	cc.style.borderColor = '#d4a2b5';
	}
	    if( channelType == "2" )
    {
	cc.style.borderColor = '#93a6b4';
	}
	    if( channelType == "3" )
    {
	cc.style.borderColor = '#c8d4a2';
	}
}
function d(cc,channelType)
{
    if( channelType == "" )
    {
	cc.style.borderColor = '#ECD6DF';
	}
	if( channelType == "2" )
    {
	cc.style.borderColor = '#dee2e5';
	}
	if( channelType == "3" )
    {
	cc.style.borderColor = '#d9dfc7';
	}
}
function writeCookie(name, value, hours)
{
	var expire = "";
	if(hours != null)
	{
		expire = new Date((new Date()).getTime() + hours * 3600000);
		expire = "; expires=" + expire.toGMTString();
	}
	domain = "";
	path = "; path=/";
	document.cookie = name + "=" + escape(value) + path + domain + expire;
}
function readCookie(name)
{
	var cookieValue = "";
	var pattern = new RegExp(name + "=([^ ;]*)", "i");
	if (document.cookie.length > 0 && name.length > 0 && pattern.test(document.cookie))
	{
		pattern.exec(document.cookie);
		cookieValue = RegExp.$1;
	}
	return cookieValue;
}

//var a4_D='http://www.tuytx.com/ad/google008.htm';

//var txt4_D='<div style="width:965px;"><div style="border:1px #CAD2DF solid;background:#fff"><div style="z-index:1;POSITION:relative" ><iframe width="960" height="83" scrolling="no" frameborder="0" MARGINHEIGHT="0" MARGINWIDTH="0" src="'+a4_D+'"></iframe></div></div></div>';


function BeginLoadAdvertise(){
	//if (document.getElementById('ad_008_1')!=null)document.getElementById('ad_008_1').innerHTML=txt4_D;;
}



function GetGuguaSetHeight(AdSpanId)
{
	  eval('var AdHeight;if(typeof(n'+AdSpanId+')==\'string\'){AdHeight=n'+ AdSpanId+';}else{if(typeof(gugaid_' + AdSpanId + ')=="number"){var IsHaveVar;eval("IsHaveVar=typeof(n' + AdSpanId + '_"+gugaid_' + AdSpanId + '+")");if(IsHaveVar=="string"){eval("AdHeight=n' + AdSpanId + '_"+gugaid_' + AdSpanId + ')}else{AdHeight=0}}else{AdHeight=0}}');
	  return AdHeight;
}

function WriteGuguaDiv(AdSpanId,AdHeight)
{
//	if ( AdHeight != 0 )
//	{
//		document.write('<div id=' + AdSpanId + ' style=height:' + AdHeight + 'px;z-index:0></div>');
//	}
//	else
//	{
//		document.write('<div id=' + AdSpanId + ' style=height:83px;z-index:0><spacer></spacer></div>');
//	}
}

function WriteAdSpan(AdSpanId)
{
	var AdHeight = GetGuguaSetHeight(AdSpanId);
	WriteGuguaDiv(AdSpanId,AdHeight)
}

function WriteAdSpan(AdSpanId,AdHeight)
{
	var tempHeight = GetGuguaSetHeight(AdSpanId);
	WriteGuguaDiv(AdSpanId,tempHeight);
}
function WriteSpan(AdSpanId)
{
	WriteAdSpan(AdSpanId);
}
function WriteSpan(AdSpanId,AdHeight)
{
	WriteAdSpan(AdSpanId,AdHeight);
}

