function indexFlash(element,url,width,height,images,links,texts)
{
	if (!my_getbyid(element)) return;
	var str = '';
	str += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,9,0" width="'+ width +'" height="'+ height +'">';
	str += '<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+url+'"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">';
	str += '<param name="menu" value="false"><param name=wmode value="opaque">';
	str += '<param name="FlashVars" value="pics='+images+'&amp;links='+links+'&amp;texts='+texts+'&amp;borderwidth='+width+'&amp;borderheight='+height+'&amp;textheight=0">';
	str += '<embed src="'+url+'" wmode="opaque" FlashVars="pics='+images+'&amp;links='+links+'&amp;texts='+texts+'&amp;borderwidth='+width+'&amp;borderheight='+height+'&amp;textheight=0" menu="false" bgcolor="#ffffff" quality="high" width="'+ width +'" height="'+ height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	str += '</object>';
	my_getbyid(element).innerHTML = str;
}

function load_init()
{
	GetResult(1,"province");
	in_list(0);
	al_list();
	in_isnew();
	gp_list();
	in_party();
	in_annouce();
	//online();
}

function in_list(p)
{
document.getElementById("list").innerHTML =template;
if (p!=0){
	var url="/httpreq/search.asp?action=in_list&maxpage=15&MaxTop=8&skin=3&order=0&desc=0&UserIsTop=1&province="+escape(p);
}else{var url="/httpreq/search.asp?action=in_list&maxpage=15&MaxTop=8&skin=3&order=0&desc=0&UserIsTop=1";
	}
var ajaxobj=new AJAXRequest;
ajaxobj.method="POST"; 
ajaxobj.url=url;
//order:order by
//desc:0-desc,1-asc
ajaxobj.callback=function(xmlobj) {
var response = xmlobj.responseText.split("$$");
set_innerHTML('list',response[0]);
}
ajaxobj.send();
}

function al_list()
{
//TypeID为相册类别，0为不限制；Att为相册属性如推荐等，0为不限制。
//Att:1为推荐，2为热门，3为排序，4为评论数
var ajaxobj=new AJAXRequest;
ajaxobj.method="POST"; 
ajaxobj.url="/httpreq/album.asp?action=album&MaxTop=5&Order=0&Maxpage=5&Skin=0&Page=1";
ajaxobj.callback=function(xmlobj) {
var response = xmlobj.responseText.split("$$");
my_getbyid("al_list").innerHTML =response[0];
}
ajaxobj.send();
}

function in_isnew()
{
var ajaxobj=new AJAXRequest;
ajaxobj.method="POST"; 
ajaxobj.url="/httpreq/search.asp?action=in_list&maxpage=5&MaxTop=5&skin=2&order=0&desc=0";
ajaxobj.callback=function(xmlobj) {
var response = xmlobj.responseText.split("$$");
set_innerHTML('isnew',response[0]);
}
ajaxobj.send();
}
function gp_list(){
	ajaxobj=new AJAXRequest;
	ajaxobj.method="POST"; 
	ajaxobj.url="/httpreq/group.asp?action=group&Maxpage=15&Maxtop=2&order=1&skin=1&desc=0&page=1";
	ajaxobj.callback=function(xmlobj) {
		var response = xmlobj.responseText.split("$$");
		my_getbyid("gp_list").innerHTML =response[0];
		}
	ajaxobj.send();
}

function in_party(){
	ajaxobj=new AJAXRequest;
	ajaxobj.method="POST"; 
	ajaxobj.url="/httpreq/party.asp?action=list&Maxpage=15&Maxtop=5&order=4&skin=2&desc=0&page=1&len=18";
	ajaxobj.callback=function(xmlobj) {
		var response = xmlobj.responseText.split("$$");
		my_getbyid("pa_list").innerHTML =response[0];
		}
	ajaxobj.send();
}

function in_annouce(){
	ajaxobj=new AJAXRequest;
	ajaxobj.method="POST"; 
	ajaxobj.url="/httpreq/data.asp?action=get_ann&Maxpage=10&Maxtop=5&PostID=0&page=1";
	ajaxobj.callback=function(xmlobj) {
		var response = xmlobj.responseText.split("$$");
		my_getbyid("ann").innerHTML =response[0];
		}
	ajaxobj.send();
}
function showann(s){
	if (s!=0){
	ajaxobj=new AJAXRequest;
	ajaxobj.method="POST"; 
	ajaxobj.url="/httpreq/data.asp?action=show_ann&ID="+escape(s);
	ajaxobj.callback=function(xmlobj) {
		var response = xmlobj.responseText;
		setDisplay("load_div",'0');
		response="<div style='color:red'>"+response+"</div><div style='text-align:right'>5钞钟自动关闭</div>"
		show_info(response,'400','280');
		setTimeout("sdis_play()",5000);
		}
	ajaxobj.send();
	}else{setDisplay("load_div",'1');}
}

function GetResult(pid,selectid)
{
var ajaxobj=new AJAXRequest;
ajaxobj.method="POST"; 
ajaxobj.url="/reg.asp?action=getpost&pid="+pid+"&elementID="+selectid+"";
ajaxobj.callback=function(xmlobj) {
var response = xmlobj.responseText.split("$$");
BuildSel(response[0],document.getElementById(response[1]));
}
ajaxobj.send();
}

function BuildSel(str,sel)
{
//先清空原来的数据.
sel.options.length=0;
var arrstr = new Array();
arrstr = str.split(",");
sel.options.add(new Option( "---请选择---","")); 
if(str.length>0) 
{
for(var i=0;i<arrstr.length;i++)
{
//分割字符串
var subarrstr=new Array;
var myEle = document.createElement("OPTION") ;
subarrstr=arrstr[i].split("|");
//生成下级菜单
myEle.value = subarrstr[0];
myEle.text = subarrstr[1];
sel.options.add(myEle); 
}
sel.options[0].selected=true
}
}
function online()
{
var ajaxobj=new AJAXRequest;
ajaxobj.method="POST"; 
ajaxobj.url="/httpreq/data.asp?action=online";
ajaxobj.callback=function(xmlobj) {
var response = xmlobj.responseText.split("$$");
my_getbyid("online").innerHTML =response[0];
}
ajaxobj.send();
}