﻿function $id(id){ return document.getElementById(id) }
function isie() { if( navigator.appName.indexOf("Microsoft") > -1 ) return true; else return false; }

function readSelectValue(listID)
{
	var SelectValue; 
	SelectValue=listID.options[listID.selectedIndex].value; 
	return SelectValue;
}

function ExtractOption(val,obj)
{
	var i = 0;
	for(i=obj.length-1;i>=0;i--)
	{
		if ( obj[i].value != "" )
		{
			obj.remove(i);
		}
	}

	val = val.split("|");
	for(i=0;i < val.length;i++)
	{
		if ( val[i] == "" )
		{
			continue;
		}
		var v = val[i].split(":");
		obj.options[obj.length] = new Option(v[1],v[0]);
	}
}

function cClass(item, cName)
{
	item.className=cName;
}

//ajax
function reflash()
{
	window.location.reload();
}
function makeURL(url)
{
	new ajax (url, {method: 'GET', onComplete: urlStateChange});
}
function urlStateChange()
{
	reflash();
}
function goBack()
{
	window.history.go(-1);
}

function getrad()
{
    var date=new Date();
	return 'H'+date.getHours()+'M'+date.getMinutes()+'S'+date.getSeconds()+'MS'+date.getMilliseconds();
}

function sayhi()
{
    url = '/hello.aspx?time=' + getrad();// makeradurl(url);
	new ajax (url, {method: 'GET', update: $('hello') });
}

function delitem( url )
{
    url = url + '&time=' + getrad();// makeradurl(url);
    new ajax (url, {method: 'GET', onComplete: showstatue});
}
function showstatue(transport)
{
    alert( transport.responseText );
	reflash();
}