function favorite(){
if (document.all){
window.external.AddFavorite('http://www.sistylensp.com','矽世代─天然奈米矽土美妝保養清潔用品');
}else if(window.sidebar){
window.sidebar.addPanel('http://www.sistylensp.com','矽世代─天然奈米矽土美妝保養清潔用品','');
}
}

function pop(url,catelog,inter){
window.open(url,catelog,inter);
}

function pop_close(){
windwo.close();
}

function CheckDelete(url){
var x=window.confirm('刪除後將無法回復，您確定要刪除？');
if(x)
window.location=url;
}

function blink(id){
document.getElementById(id).style.backgroundColor="#FFF";
document.getElementById(id).style.color="#333";
}

function darker(id){
document.getElementById(id).style.backgroundColor="#DEEFEF";
document.getElementById(id).style.color="#999";
}


function citychange() {
	var i = window.document.register.area.selectedIndex;//選擇的縣市
	window.document.register.area02.length = cityarea_account[i] - cityarea_account[i-1];//鄉鎮市區選項數量
	var index = cityarea_account[i-1] + 1;//開始的編號
	window.document.register.area02.options[0].selected=true;
	for (j = 0; j < window.document.register.area02.length; j ++) {
		window.document.register.area02.options[j].value = cityarea[index + j];
		window.document.register.area02.options[j].text = cityarea[index + j];
	}
}

function zipcode_change(){
var i = window.document.register.area.selectedIndex;//選擇的縣市
var j=window.document.register.area02.selectedIndex;//選擇的鄉鎮市區
var index = cityarea_account[i-1]+1;//開始的編號
var k=index+j;
window.document.register.zipcode.value=zipcode[k];
}

  function getCaptcha() {       // 讓使用者可更換圖案
    var d = new Date();
    document.getElementById("captchaImage").
      setAttribute('src' , 'captcha/captcha.php?r='+ d.getTime());
  }




function select_all(formName, elementName, selectAllName) {
　　if(document.forms[formName].elements[selectAllName].checked)
　　　　for(var i = 0; i < document.forms[formName].elements[elementName].length; i++)
　　　　　　document.forms[formName].elements[elementName][i].checked = true;
　　else
　　　　for(var i = 0; i < document.forms[formName].elements[elementName].length; i++)
　　　　　　document.forms[formName].elements[elementName][i].checked = false;
}


