window.onerror = function(){return true;}
function showring(thisdata,t)
{
var arraya;
var arrayb;
arraya = thisdata.split(";")
var s="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"400px\">";
for (var i=0;i<arraya.length;i++)
{
s+="<tr class=\"hl\">";
for(var j=1;j<=2;j++)
{
if(arraya[i]!=undefined){
if(arraya[i].indexOf(",")!=-1){
arrayb=arraya[i].split(",");
s+="<td width=\"28\" >"+(i+1)+".</td><td width=\"230\" ><A title=\""+arrayb[1];
s+="\" href=\"#1\" onclick=\"";
if(t=="ring"){s+="mlink";}
  else{if(t=="cring"){s+="mlinkcring";}
	else{if(t=="ivr"){s+="sendivr";}else{if(t=="ring2"){s+="openSend";}}}
		}
s+="("+arrayb[0]+")\">";
s+=arrayb[1].slice(0,12).replace(styKeys,"<font color='red'>"+styKeys+"</font>")+"£¨";
if(arrayb[2]!=undefined){s+=arrayb[2].slice(0,6).replace(styKeys.slice(0,6),"<font color='red'>"+styKeys.slice(0,6)+"</font>");}
s+="£©</a></td>";
}
}

if(j==1){i++;}
}
s+="</tr>";
}
s+="</table>";
document.write(s);
}

function openSend(id)
{
	var url;
	url="http://ring.caiku.com/sendring.aspx?id=" + id + "&" + uid;
	window.open(url,'SendRing','width=500,height=500');
	}
function sendivr(id)
{
window.open("http://ivr.caiku.com/SendSound.aspx?id="+id + "&" + uid,"","width=586,height=337");
}

function pic(unionstr,i,n,f){
	var styKeys = "";
	var s="<DIV class=r><DIV class=img>";
	s+="<a href=\"#1\" onclick=\"SendMMSWin('http://code.5k3g.com/Send_SubPic.aspx?"+unionstr+"&id="+i+"','send')\"><img src=\""+f+"\" alt=\"ÊÖ»úÍ¼Æ¬"+n+"\" title=\"ÊÖ»úÍ¼Æ¬ "+n+"\" border=\"0\" width=\"128\" height=\"128\"></a></DIV><a href=\"#1\" onclick=\"SendMMSWin('http://code.5k3g.com/Send_SubPic.aspx?"+unionstr+"&id="+i+"','send')\">"+n.replace(styKeys,"<font color='red'>"+styKeys+"</font>")+"</a></DIV>";
	return s;
}
function showpic(unionstr,thisdata,cols){
    var arraya;
	var arrayb;
	arraya = thisdata.split(";");
	var s="<table width=\"100%\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\">";
	var a=arraya.length;
	for(var y=0;y<a;y++){
		s+="<tr align=\"left\" height=\"170\">";
		for(var x=0;x<cols;x++){
		    if(arraya[y]==undefined){continue;}
		    arrayb = arraya[y].split(",");
			s+="<td>";
			s+=pic(unionstr,arrayb[0],arrayb[1],arrayb[2]);
			s+="</td>";
			if(x<cols-1){y++;}
			}
		s+="</tr>";
		}
	s+="</table>";
document.write(s);
}
