document.writeln("<style type=\"text\/css\">");
document.writeln("#control_size {position:relative;float:left;overflow:hidden;border:1px solid #B6CAE3; font-family:Tahoma, Geneva, sans-serif,宋体}");
document.writeln(".flashNews  a{color:#FFFFFF; text-decoration:none}");
document.writeln(".flashNews  a:hover{color:#F20000;}");
document.writeln(".flashNews img{ border:0}");
document.writeln(".flashNews .bg {width:100%; height:60px; background:#000000; filter:alpha(opacity=49); -moz-opacity:0.49; opacity:0.49; position:absolute; bottom:0}");
document.writeln(".flashNews h3 { position:absolute; z-index:10; padding:5px 5px 0 10px; margin:0; font-size:14px}");
document.writeln(".flashNews h3 p { padding:5px 0 0 0 ; margin:0; font-weight:normal; font-size:12px}");
document.writeln(".flashNews .t_s{ height:60px; position:absolute; width:100%; bottom:0px; left:0}");
document.writeln(".flashNews #SwitchNav { position:absolute; right:3px; bottom:0px;  z-index:2;}");
document.writeln(".flashNews ul,li{ margin:0; padding:0}");
document.writeln(".flashNews ul li {float:left;width:15px;height:18px;line-height:18px;text-align:center;margin-left:1px;background:#000000; list-style:none;}");
document.writeln(".flashNews ul li a {display:block;width:15px;height:18px;font-size:10px;font-family:Tahoma;font-weight:bold;color:#FFFFFF;}");
document.writeln(".flashNews ul li a:hover, .flashNews ul li a.sel {color:#F20000;}");
document.writeln("<\/style>");

	var imag=new Array();
	var link=new Array();
	var title = new Array();
	var flash_id_html="";
	var ftitle = new Array();
	var stitle = new Array();
	var CurScreen = 1 ;
	var switcher = new Array();
	var xx = 0;
	var refreshSwitchTimer = null;

	
function jsChangeHtml(a,b){
	var flash_id =document.getElementById("flashid");
    var fpic =document.getElementById("flashid").getElementsByTagName("img");
	var flink =document.getElementById("flashid").getElementsByTagName("a");
	var controlSize = document.getElementById("control_size");
	controlSize.style.width = a+"px";
	controlSize.style.height = b+"px";
	
	   for(var i=0;i<fpic.length;i++){
  			 imag[i]=fpic[i].src;
   			 link[i]=flink[i].href;

			 if(i>0){
			flash_id_html =flash_id_html+ "<div id=switch_"+(i+1)+" style=display:none; >";	
			 }
			else{
			 flash_id_html =flash_id_html+"<div id=switch_"+(i+1)+" >";	
				}
			 flash_id_html =flash_id_html+"<a href="+link[i]+" target='_blank' >";
			 flash_id_html =flash_id_html+"<img src="+imag[i]+" >";
			 flash_id_html =flash_id_html+"</a></div>";
   		}  
			document.write(flash_id_html);


		for(var x=0;x<fpic.length;x++){
			switcher[x] =Array();
			switcher[x]['link'] = flink[x].href;
			ftitle= fpic[x].title;
			stitle= ftitle.split("+")
			switcher[x]['title'] = stitle[0];
			if(stitle.length==1){
				switcher[x]['stitle'] =" ";
				}
			else{
					switcher[x]['stitle'] = stitle[1];
				}

			}

		switchPic(CurScreen);
		refreshSwitchTimer = setTimeout('reSwitchPic();', 3000);
}

		
function switchPic(screen) {
	if (screen > document.getElementById("flashid").getElementsByTagName("img").length) {
		screen = 1 ;
	}
	
	for (i=1;i<= document.getElementById("flashid").getElementsByTagName("img").length;i++) {
		document.getElementById("switch_"+i).style.display = "none" ;
	}
	document.getElementById("switch_"+screen).style.display = "block" ;		
	showSwitchNav(screen);
	showSwitchTitle(screen);	
	CurScreen = screen  ;
}
function showSwitchNav(screen) {
	var NavStr = "" ;
	for (i=1;i<= document.getElementById("flashid").getElementsByTagName("img").length;i++) {
		if (i == screen) {
			NavStr += '<li onmouseover="pauseSwitch();" onmouseout="goonSwitch();"><a href="javascript:" target="_self" class="sel">'+i+'</a></li>' ;
		}
		else {
			NavStr += '<li onmouseover="pauseSwitch();" onmouseout="goonSwitch();" onclick="goManSwitch('+i+');"><a href="javascript:" target="_self">'+i+'</a></li>' ;
		}
		
	}
	document.getElementById("SwitchNav").innerHTML = NavStr ;
}
function showSwitchTitle(screen) {
	var titlestr = "" ;
	titlestr = '<h3><a href="'+switcher[screen-1]['link']+'" target="_blank">'+switcher[screen-1]['title']+'</a><p><a href="'+switcher[screen-1]['link']+'" target="_blank">'+switcher[screen-1]['stitle']+'</a></p></h3>' ;
	document.getElementById("SwitchTitle").innerHTML = titlestr ;
}
function reSwitchPic() {
	refreshSwitchTimer = null;
	switchPic(CurScreen+1);
	refreshSwitchTimer = setTimeout('reSwitchPic();', 3000);
}
function pauseSwitch() {
	clearTimeout(refreshSwitchTimer);
}
function goonSwitch() {
	clearTimeout(refreshSwitchTimer);
	refreshSwitchTimer = setTimeout('reSwitchPic();', 3000);
}
function goManSwitch(index) {
	clearTimeout(refreshSwitchTimer);
	
	CurScreen = index - 1 ;
	reSwitchPic();
}
