// JavaScript Document function showsubmenu(sid) { whichEl = eval("submenu" + sid); if (whichEl.style.display == "none") { eval("submenu" + sid + ".style.display=\"\";"); } } function hidesubmenu(sid) { whichEl = eval("submenu" + sid); if (whichEl.style.display == "") { eval("submenu" + sid + ".style.display=\"none\";"); } } function showinfo(names,n){ var chList=document.getElementsByName("ch"+names); var TextArea=document.getElementById("contents"); if(chList[n-1].checked){ //数组从0开始 var temp= TextArea.value; TextArea.value = temp.replace(document.getElementById(names+n).innerHTML,""); TextArea.value+= document.getElementById(names+n).innerHTML; }else{ var temp= TextArea.value; TextArea.value = temp.replace(document.getElementById(names+n).innerHTML,""); } } function showinfo2(names,n){ var chList=document.getElementsByName("ch"+names); var TextArea=document.getElementById("contents2"); if(chList[n-1].checked){ //数组从0开始 var temp= TextArea.value; TextArea.value = temp.replace(document.getElementById(names+n).innerHTML,""); TextArea.value+= document.getElementById(names+n).innerHTML; }else{ var temp= TextArea.value; TextArea.value = temp.replace(document.getElementById(names+n).innerHTML,""); } } function showinfo3(names,n){ var chList=document.getElementsByName("ch"+names); var TextArea=document.getElementById("contents3"); if(chList[n-1].checked){ //数组从0开始 var temp= TextArea.value; TextArea.value = temp.replace(document.getElementById(names+n).innerHTML,""); TextArea.value+= document.getElementById(names+n).innerHTML; }else{ var temp= TextArea.value; TextArea.value = temp.replace(document.getElementById(names+n).innerHTML,""); } } function showinfo4(names,n){ var chList=document.getElementsByName("ch"+names); var TextArea=document.getElementById("contents4"); if(chList[n-1].checked){ //数组从0开始 var temp= TextArea.value; TextArea.value = temp.replace(document.getElementById(names+n).innerHTML,""); TextArea.value+= document.getElementById(names+n).innerHTML; }else{ var temp= TextArea.value; TextArea.value = temp.replace(document.getElementById(names+n).innerHTML,""); } } function showinfo5(names,n){ var chList=document.getElementsByName("ch"+names); var TextArea=document.getElementById("contents5"); if(chList[n-1].checked){ //数组从0开始 var temp= TextArea.value; TextArea.value = temp.replace(document.getElementById(names+n).innerHTML,""); TextArea.value+= document.getElementById(names+n).innerHTML; }else{ var temp= TextArea.value; TextArea.value = temp.replace(document.getElementById(names+n).innerHTML,""); } } function CheckAllProvince(form) { for (var i=0;i<40;i++)//表单内有其它原素 { var e = form.elements[i]; if (e.Name != "chkAll" ) e.checked = form.chkAll.checked; } } function resizeimg(maxWidth,maxHeight,objImg){ var img = new Image(); img.src = objImg.src; var hRatio; var wRatio; var Ratio = 1; var w = img.width; var h = img.height; wRatio = maxWidth / w; hRatio = maxHeight / h; if (maxWidth ==0 && maxHeight==0){ Ratio = 1; }else if (maxWidth==0){// if (hRatio<1) Ratio = hRatio; }else if (maxHeight==0){ if (wRatio<1) Ratio = wRatio; }else if (wRatio<1 || hRatio<1){ Ratio = (wRatio<=hRatio?wRatio:hRatio); } if (Ratio<1){ w = w * Ratio; h = h * Ratio; } objImg.height = h; objImg.width = w; }