function GetRadioValue(RadioName){
    var obj;   
    obj=document.getElementsByName(RadioName);
    if(obj!=null){
        var i;
        for(i=0;i<obj.length;i++){
            if(obj[i].checked){
                return obj[i].value;           
            }
        }
    }
    return null;
}
    function getcity(x)
  {
document.f.cty.options.length = 1;
document.f.dst.options.length = 1;
var s=document.createElement('SCRIPT');
///s.src="http://www.weatherchina.org/plugin/getcity.asp?i=" + x;
s.src="/other/getcity.asp?i=" + x;
s.type = "text/javascript";   
s.language = "javascript";  
/////////document.body.appendChild(s);
document.getElementsByTagName("head")[0].appendChild(s);
} 
    function getdst(x)
  {
document.f.dst.options.length = 1;
var s=document.createElement('SCRIPT');
///s.src="http://www.weatherchina.org/plugin/getcity.asp?i=" + x;
s.src="/other/getdst.asp?i=" + x;
s.type = "text/javascript";   
s.language = "javascript";  
/////////document.body.appendChild(s);
document.getElementsByTagName("head")[0].appendChild(s);
} 
    function chk(x)
  {
document.getElementById("pv").innerHTML="";
document.getElementById("chk").innerHTML="<img src=\"/images/indicator.gif\" />";
var s=document.createElement('SCRIPT');
///s.src="http://www.weatherchina.org/plugin/getcity.asp?i=" + x;
s.src="/other/chkdst.asp?x=" + x;
s.type = "text/javascript";   
s.language = "javascript";  
/////////document.body.appendChild(s);
document.getElementsByTagName("head")[0].appendChild(s);
} 
    function pv()
  {
document.getElementById("pv").innerHTML="<img src=\"/images/indicator.gif\" />";
var timestamp = (new Date()).valueOf(); 
var s=document.createElement('SCRIPT');
s.type = "text/javascript";   
s.language = "javascript";  
///s.src="http://www.weatherchina.org/plugin/getcity.asp?i=" + x;
if(document.getElementById("od").value=="x")
{s.src="/other/pvlist.asp?l=" + document.getElementById("dst").options[document.getElementById("dst").options.selectedIndex].value  + "&c=" + GetRadioValue("t")  +"&t="+ timestamp;
document.getElementsByTagName("head")[0].appendChild(s);}
else
{
	if(document.getElementById("od").value=="y")
	{s.src="/other/pvlist.asp?l=" + document.getElementById("lctid").value  + "&c=" + GetRadioValue("t")  +"&t="+ timestamp;
	document.getElementsByTagName("head")[0].appendChild(s);}
	else
	{document.getElementById("pv").innerHTML="<br />Sorry, please select your location.<br />";}
	
	}



/////////document.body.appendChild(s);

} 


    function addlist()
	{
//document.getElementById("weatherchina").innerHTML="<img src=\"/images/indicator.gif\" />";
var s2=document.createElement('SCRIPT');
var timestamp = (new Date()).valueOf(); 
s2.type = "text/javascript";   
s2.language = "javascript";  
///s.src="http://www.weatherchina.org/plugin/getcity.asp?i=" + x;
if(document.getElementById("od").value=="x")
{s2.src="/other/addlist.asp?l=" + document.getElementById("dst").options[document.getElementById("dst").options.selectedIndex].value  + "&c=" + GetRadioValue("t")  +"&t="+ timestamp;
document.getElementsByTagName("head")[0].appendChild(s2);}
else
{
	if(document.getElementById("od").value=="y")
	{s2.src="/other/addlist.asp?l=" + document.getElementById("lctid").value  + "&c=" + GetRadioValue("t")  +"&t="+ timestamp;
	document.getElementsByTagName("head")[0].appendChild(s2);}
	else
	{document.getElementById("addchina").innerHTML="<br />Sorry, please select your location.<br />";}
	
	}
} 

    function rmlist(x)
	{//document.getElementById("weatherchina").innerHTML="<img src=\"/images/indicator.gif\" />";
var s40=document.createElement('SCRIPT');
var timestamp = (new Date()).valueOf(); 
s40.type = "text/javascript";   
s40.language = "javascript";  
//s.src="/other/rmlist.asp?l=" + x;
s40.src="/other/rmlist.asp?l=" + x +"&t="+ timestamp;
document.getElementsByTagName("head")[0].appendChild(s40);
} 
    function uplist(x)
	{
//document.getElementById("weatherchina").innerHTML="<img src=\"/images/indicator.gif\" />";
var s23=document.createElement('SCRIPT');
var timestamp = (new Date()).valueOf(); 
s23.type = "text/javascript";   
s23.language = "javascript";  
//s.src="/other/rmlist.asp?l=" + x;
s23.src="/other/uplist.asp?l=" + x +"&t="+ timestamp;
document.getElementsByTagName("head")[0].appendChild(s23);
} 
    function downlist(x)
	{
//document.getElementById("weatherchina").innerHTML="<img src=\"/images/indicator.gif\" />";
var s17=document.createElement('SCRIPT');
var timestamp = (new Date()).valueOf(); 
s17.type = "text/javascript";   
s17.language = "javascript";  
//s.src="/other/rmlist.asp?l=" + x;
s17.src="/other/downlist.asp?l=" + x +"&t="+ timestamp;
document.getElementsByTagName("head")[0].appendChild(s17);
} 
