function popUp(URL) {

day = new Date();
id = day.getTime();

window.open(URL, 'popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=450,height=450,left = 337,top = 184');

}

function popUpCustom(URL, width, height) {

day = new Date();
id = day.getTime();

window.open(URL, 'popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+width+',height='+height+',left = 337,top = 184');

}

dom = new Object;

dom.createLink = function(id, href, content, clear)
{
	if (clear)
	{
		document.getElementById(id).innerHTML = "";
	}
	
	var link = document.createElement("A");
	link.href = href;
	link.innerHTML = content;
	document.getElementById(id).appendChild(link);

}

dom.createElement = function(type, id, style, content)
{
		var tag = document.createElement(type.toUpperCase());
		
		tag.id = id;
		
		for (var key in style)
		{
			tag.style[key] = style[key];
		}
		
		if (content)
		{
			tag.innerHTML = content;
		}
		
		return tag;		
}

var MAX_DUMP_DEPTH = 1;
 
dom.dump = function (obj, name, indent, depth)
{
	if (depth > MAX_DUMP_DEPTH) 
	{
		return indent + name + ": <Maximum Depth Reached>\n";
	}
    
    if (typeof obj == "object") 
    {
		var child = null;
        var output = indent + name + "\n";
        indent += "\t";

        for (var item in obj)
        {
        	try 
        	{
            	child = obj[item];
            } 
            catch (e) 
            {
	            child = "<Unable to Evaluate>";
            }
            if (typeof child == "object") 
            {
	           // output += dom.dump(child, item, indent, depth + 1);
            } 
            else 
            {
				output += indent + item + ": " + child + "\n";
		    }
		}
		return output;
	} 
	else 
	{
		return obj;
	}
}

dom.include = function (filename) 
{
    var html = document.getElementsByTagName('head').item(0);
    var js = document.createElement('script');
    js.setAttribute('language', 'javascript');
    js.setAttribute('type', 'text/javascript');
    js.setAttribute('src', filename);
    html.appendChild(js);
    return false;
}