// setHomepage   
function setHomepage(){
	if(document.all){
		document.body.style.behavior  = 'url(#default#homepage)';
		document.body.setHomePage('http://www.szwellstar.com/');
	}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','http://www.szwellstar.com/');
	}
}

// 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 check_feed_form(prompt01,prompt02,prompt03,prompt04,prompt05){
	if(document.myform.title.value==''){
		alert(prompt01);
		document.myform.title.focus();
		return false;
	}	
	if(document.myform.name.value==''){
		alert(prompt02);
		document.myform.name.focus();
		return false;
	}	
	if(document.myform.address.value==''){
		alert(prompt03);
		document.myform.address.focus();
		return false;
	}	
	if(document.myform.email.value==''){
		alert(prompt04);
		document.myform.email.focus();
		return false;
	}	
	if(document.myform.content.value==''){
		alert(prompt05);
		document.myform.content.focus();
		return false;
	}	
}


function check_order_form(order01,order02,order03,order04,order05,order06,order07){
	if(document.myform.p_no.value==''){
		alert(order01);
		document.myform.p_no.focus();
		return false;
	}	
	if(document.myform.p_num.value==''){
		alert(order02);
		document.myform.p_num.focus();
		return false;
	}	
	if(document.myform.name.value==''){
		alert(order03);
		document.myform.name.focus();
		return false;
	}	
	if(document.myform.tel.value==''){
		alert(order04);
		document.myform.tel.focus();
		return false;
	}	
	if(document.myform.packing.value==''){
		alert(order05);
		document.myform.packing.focus();
		return false;
	}	
	if(document.myform.del_time.value==''){
		alert(order06);
		document.myform.del_time.focus();
		return false;
	}	
	if(document.myform.del_add.value==''){
		alert(order07);
		document.myform.del_add.focus();
		return false;
	}	
}
