function del(val){
    selectTo=document.getElementById(val);
    clearLength=selectTo.options.length;
		while (clearLength--) selectTo.options[0]=null;
}

function addOption(selectId, txt, val)
{
		//alert ('debug');
        var objOption = new Option(txt,val);
        document.getElementById(selectId).options.add(objOption);
}

function createTable(table_data, table_id, table_location)
{
    $('#'+table_location).append(table_data);
}

function autoResize(elementId)
{
	var iOffSet = 0;
	if($.browser.msie)
	{
		var iOffSet = 10;
		var iH = $('#'+elementId).height() +iOffSet;
		var iW = $('#'+elementId).width();
	}
	else
	{
		var iW = $('#'+elementId).width() +iOffSet;		
		var iH = $('#'+elementId).height();
	}
	// debug: use alert below to get calc dimensions on load
	// alert("iframe: (w:" + iW + ", h:" + iH + ")");
	// limit the window height and enable scrollbars
	parent.$.fn.colorbox.myResize(iW, iH);
}
