function openmini(starcode, param) { if(param=='' || param==null || param.length==0){ window.open("http://mini.ufotown.cn/page/Main/Main.html?starcode="+starcode, "_blank"); }else { window.open("http://mini.ufotown.cn/page/Main/Main.html?starcode="+starcode+"&"+param, "_blank"); } try { shliststatus = true; shlist(); } catch (e) { } } function showHeadOver(obj){ obj.src=obj.src.replace(".gif","over.gif"); } function showHeadOut(obj){ obj.src=obj.src.replace("over",""); } function shlist(){ document.getElementById("t_select-list").style.display=document.getElementById("t_select-list").style.display=="block"?"none":"block"; } function cws(val){ iws=val; } function hlist(){ if(!iws)document.getElementById("t_select-list").style.display="none"; } //*** FLY_Mail_mingxing ***// function showDiv(obj,num,len) { for(var id = 1;id<=len;id++) { var ss=obj+id; var snav =obj+"nav"+id; if(id==num){ try{document.getElementById(ss).style.display="block"}catch(e){}; try{document.getElementById(snav).className="active"}catch(e){}; }else{ try{document.getElementById(ss).style.display="none"}catch(e){}; try{document.getElementById(snav).className=""}catch(e){}; } } } function writeflash1(_src,fw,fh,_transparent,_vars){ if (_transparent=="") _transparent="transparent"; var html = '' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n' + '\n'; document.write(html); } var cc,num; function change(cc,num){ var dd = document.getElementById(cc); if(num==1){ dd.style.border="2px solid red"; }else{ dd.style.border="2px solid white"; } } function showStarView(starcode,starname){ showDefault(starcode); document.getElementById("tostar").value = starname; document.getElementById("starcode").value = starcode; bgpicObj = document.getElementById("bgpic"); bgpicObj.src = preLoad[starcode].src; } function mouseStarView(starcode, mode){ leftMenuObj = document.getElementById("img_left_menu_"+starcode); if(mode == 1) { leftMenuObj.style.border="solid red 2px"; } else { leftMenuObj.style.border="solid white 2px"; } } var xmlHttp; function createXMLHttpRequest(){ if(window.ActiveXObject){ xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if(window.XMLHttpRequest){ xmlHttp = new XMLHttpRequest(); } } function showDefault(starcode){ createXMLHttpRequest(); try{ xmlHttp.onreadystatechange = function(){procBestFly(starcode);} xmlHttp.open("GET", "http://www.ufotown.cn/page/Cache/cache/MainBestFly.xml", true); xmlHttp.setRequestHeader("If-Modified-Since","0");//禁止读取缓存(每次都发起一次请求),没有设置该值则会出现读取缓存的现象。 xmlHttp.setRequestHeader("Cache-Control","no-cache"); xmlHttp.send(null); }catch(exception){ alert(exception.message); } } function procBestFly(starcode){ if(xmlHttp.readyState == 4){ if (xmlHttp.status == 200 || xmlHttp.status == 0){ // 显示返回结果 parseResults(starcode); } } } //读取XML文件 function parseResults(starcode){ var results = xmlHttp.responseXML; var sDiv = ""; var recordObj = "null"; var record = results.getElementsByTagName("record"); var arrStar = new Array(); for (var i = 0;i< record.length; i++){ recordObj = record[i]; var starid = recordObj.getElementsByTagName("starmo")[0].firstChild.nodeValue; arrStar[starid] = new Array(); arrStar[starid]['name'] = decodeURIComponent(recordObj.getElementsByTagName("name")[0].firstChild.nodeValue); arrStar[starid]['time'] = recordObj.getElementsByTagName("time")[0].firstChild.nodeValue; arrStar[starid]['text'] = decodeURIComponent(recordObj.getElementsByTagName("text")[0].firstChild.nodeValue); arrStar[starid]['imgs'] = recordObj.getElementsByTagName("imgs")[0].firstChild.nodeValue; arrStar[starid]['url'] = recordObj.getElementsByTagName("url")[0].firstChild.nodeValue; arrStar[starid]['sf_text'] = decodeURIComponent(recordObj.getElementsByTagName("sf_text")[0].firstChild.nodeValue);//基本句子 //return; } sDiv = addDiv(starcode,arrStar[starcode]['name'],arrStar[starcode]['time'],Replacejiahao(arrStar[starcode]['text']),arrStar[starcode]['imgs'],arrStar[starcode]['url']); document.getElementById("Layer1").innerHTML = sDiv; if(arrStar[starcode]['sf_text']=='empty'){ var sf_text = ''; }else{ var sf_text = Replacejiahao(arrStar[starcode]['sf_text']); } try { document.getElementById("fly_msg").innerHTML = sf_text; document.getElementById("starmo").innerHTML = " "+starcode; } catch (e){} } //输出格式化 function addDiv(starcode,name,time,text,img,url){ var WDiv = ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += "
 
"; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += "
"; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += "
"; WDiv += ""; WDiv += ""; WDiv += ""; WDiv += "
 
"+time+"
 
"+text+"[FROM]:"+name+"
"; return WDiv; } function sendFlyView() { // Photo FLY if(Number(document.frm_phone.fly_img.value.length) > 0) { parent.document.getElementById("viewFlyWenzi").style.display = "none"; parent.document.getElementById("viewFlyPic").style.display = ""; parent.document.getElementById("yulanpic").src = "http://images.ufotown.cn/20080618/op/Fly/WEB/small/" + document.frm_phone.fly_img.value; parent.document.getElementById("fly_pic").value = document.frm_phone.fly_msg.value; } else { parent.document.getElementById("viewFlyPic").style.display = "none"; parent.document.getElementById("viewFlyWenzi").style.display = ""; parent.document.getElementById("fly_wenzi").value = document.frm_phone.fly_msg.value; } } var div_id; var scroll_status; scroll_status = 0; function initializedragie(id){ scroll_status = 1; div_id = id; iex = event.clientX; iey = event.clientY; tempx = document.getElementById(div_id).style.pixelLeft; tempy = document.getElementById(div_id).style.pixelTop; dragapproved = true; document.onmousemove = drag_dropie; } var dragapproved = false; function drag_dropie(){ if (dragapproved == true){ document.getElementById(div_id).style.pixelLeft=tempx+event.clientX-iex; document.getElementById(div_id).style.pixelTop=tempy+event.clientY-iey; return false; } } if (document.all) { document.onmouseup = new Function("dragapproved=false"); } function clearMsg() { var starmo = document.getElementById('starcode').value; if (starmo=='undefined' || starmo==null){ alert('error MO NUM!'); return false; } var msg = arr[starmo]; var fly_value = document.getElementById('fly_msg').value; if(fly_value==msg){ document.getElementById('fly_msg').value = ''; } } var str; function Replacejiahao(str){ var r, re; // 声明变量。 re = /\+/g; // 创建正则表达式模式。 r = str.replace(re, " "); // 用 "A" 替换 "The"。 return(r); // 返回替换后的字符串。 } function earlyOnload(init_func) { document.write(""); var _script = document.getElementById("__ie_onload"); _script.onreadystatechange = function() { if(this.readyState == "complete") { eval(init_func); }}; }