function getExist(Obj)
{
	return (typeof(Obj)=="undefined");
}

function show(content)
{
	document.write(content);
}

function getWidth()
{
	return document.body.clientWidth;
}

function getHeight()
{
	return document.body.clientHeight;
}

function spacer(width, height)
{
	document.write('<img src="'+imagefolder+'common/blank.gif" width="'+width+'" height="'+height+'" border="0" alt="">');
}

function random()
{
	var seed1=4096;
	var seed2=150889;
	var seed3=714025;
	var seed = (new Date()).getTime() % seed3;
	return Math.floor((((seed * seed1 + seed2) % seed3)/seed3)*10);
}

function getCursorLocation()
{
	return window.location + '';
}

function killspace(string)
{
	while((string.length>0) && (string.charAt(0)==' '))
	var string = string.substring(1,string.length);
	while((string.length>0) && (string.charAt(string.length-1)==' '))
	var string = string.substring(0,string.length-1);
	return string;
}

function dashspacing(string, space)
{
	if (getExist(space)) space = '';
	var result = '';

	for (var i=0; i <= string.length; i++)
	{
		if (string.charAt(i) == '_') result += space;
		else result += string.charAt(i);
	}

	return result;
}

function loadXML(file)
{
	xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
	xmlDoc.async = "false";
	xmlDoc.load(file);
}

function sortByName(a, b) {
    var x = a.Name.toLowerCase();
    var y = b.Name.toLowerCase();
    return ((x < y) ? -1 : ((x > y) ? 1 : 0));
}

function order(name, id) {
    this.Name = name;
    this.ID = id;
}

