// setHomepage   
function setHomepage(web_url){
	if(document.all){
		document.body.style.behavior = 'url(#default#homepage)';
		document.body.setHomePage(web_url);
	}else if(window.sidebar){
		if(window.netscape){
			try{
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
			}catch(e){
				alert("The operation was refused by browser,if you want to enable this feature, please enter in the address column 'about:config', then, change 'signed.applets.codebase_principal_support' to 'true'.");   
			}
		}
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
		prefs.setCharPref('browser.startup.homepage',web_url);
	}
}

// addfavorite   
function addfavorite(web_name,web_url){
	if (document.all){
		window.external.addFavorite(web_url,web_name);
	}else if (window.sidebar){
		window.sidebar.addPanel(web_name,web_url,"");
	}
}

function change_tab(tab_id){
	if(tab_id==1){
		document.getElementById("tab01").style.color = "#ffffff";
		document.getElementById("tab02").style.color = "#737373";
		document.getElementById("tab01").style.backgroundImage = "url(/syd/images/tab_01.gif)";
		document.getElementById("tab02").style.backgroundImage = "url(/syd/images/tab_02.gif)";
		document.getElementById("tab_content01").style.display = "block";
		document.getElementById("tab_content02").style.display = "none";
	}
	
	if(tab_id==2){
		document.getElementById("tab01").style.color = "#737373";
		document.getElementById("tab02").style.color = "#ffffff";
		document.getElementById("tab01").style.backgroundImage = "url(/syd/images/tab_02.gif)";
		document.getElementById("tab02").style.backgroundImage = "url(/syd/images/tab_01.gif)";
		document.getElementById("tab_content01").style.display = "none";
		document.getElementById("tab_content02").style.display = "block";
	}
}


function check_feed(tip01,tip02,tip03,tip04,tip05){
	if(document.myform.title.value==''){
		alert(tip01);
		document.myform.title.focus();
		return false;
	}	
	if(document.myform.name.value==''){
		alert(tip02);
		document.myform.name.focus();
		return false;
	}	
	if(document.myform.tel.value==''){
		alert(tip03);
		document.myform.tel.focus();
		return false;
	}	
	if(document.myform.email.value==''){
		alert(tip04);
		document.myform.email.focus();
		return false;
	}	
	if(document.myform.content.value==''){
		alert(tip05);
		document.myform.content.focus();
		return false;
	}	
}

