var url=window.location.href;
if(window!=parent&&url.indexOf("bbs")==-1)
	parent.navigate(url);

function showFlash(showId,flashSrc,flashW,flashH){
	document.getElementById(showId).innerHTML='<embed src="'+flashSrc+'" height="'+flashH+'" width="'+flashW+'" wmode="transparent" type="application/x-shockwave-flash"></embed>';
}

//js调flash去虚线.
function insert_flash(url,width,height){
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">\n');
    document.write('<param name="movie" value="'+url+'" />\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="allowFullScreen" value="true" />');
	document.write('<param name="wmode" value="opaque">\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('<embed src="'+url+'" quality="high" allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" wmode="opaque" wmode="transparent"></embed>\n');
    document.write('</object>\n');
}

function showArtTab(id)
{
	var title	= "art_"+id;
	var obj		= document.getElementById($title);
	obj.className	= "s";
	for(var i=0;i<6;i++)
	{
		var oid	= "artcon_"+i;
		var oj	= document.getElementById(oid);
		if(i != id)
		{
			oj.className = "sd";	
		}
	}
}


// Index Article Show Type List;
function showIndexArtCont(url,tid,ii,count){
	$('#thisartcon').html("<img src='/images/loading.gif'>");

		for(var i = 1;i<=count;i++){
			$('#articletag_'+i).css({color: "#fff"});
		}

	$.post(url,
		   {tid:tid},
		   function(txt){
			   $('#thisartcon').html(txt);
			   $('#thisartcon').slideDown("slow");
			   $('#articletag_'+ii).css({color: "#F9C"});
			});	
}

// Index Article Show News Coontent;
function showIndexArtContect(tid){
	$('#thisartcon').html("<img src='/images/loading.gif'>");
	$.post('ajax.php?action=SIArticle',
		   {tid:tid},
		   function(txt){
			   $('#thisartcon').html(txt);
			   $('#thisartcon').slideDown("slow");
			});	
}

// Works List;
function showworks(url,id,tid){
	$('#thisworksarea').html("<img src='/images/loading.gif'>");
	for(var i = 1;i<=4;i++){
		$('#wordid_'+i).css({color: "#fff"});
	}
	$.post(url,
		   {id:id,tid:tid},
		   function(txt){
			   $('#thisworksarea').html(txt);
			   $('#thisworksarea').slideDown("slow");
			   $('#wordid_'+tid).css({color: "#F9C"});
			});
}


//

function Newslist(tid)
{
	$('#Newslists').html("<img src='/images/loading.gif'>");
	$.post('ajax.php?action=Newslist',
		   {tid:tid},
		   function(txt){
			   $('#Newslists').html(txt);
			   $('#Newslists').slideDown("slow");
			});
}


// NavTop
function expm(n){
	for(var i=1;i<=7;i++){
		$("#xs_"+i).removeClass();
	}
	$("#xs_"+n).addClass("ok");
}

// show Price;
function showPrice(url,id,ii,count){
	$('#thisartcon').html("<img src='/images/loading.gif'>");
	for(var i = 1;i<=count;i++){
		$('#pricetag_'+i).css({color: "#fff"});
	}
	$.post(url,
		   {id:id},
		   function(txt){
			   $('#thisartcon').html(txt);
			   $('#thisartcon').slideDown("slow");
			   $('#pricetag_'+ii).css({color: "#F9C"});
			});
}