// JavaScript Document
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=auto,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=300,left = 420,top = 150');");
}

function resize_iframe(frame_name){
document.getElementById(frame_name).height=""; // required for mozilla/firefox bugs, value can be "", null, or integer
document.getElementById(frame_name).height=window.frames[frame_name].document.body.scrollHeight;
}


function add(type,name) {

//Create an input type dynamically.
var element = document.createElement("input");
//Assign different attributes to the element.
element.setAttribute("type", type);
element.setAttribute("name", name);
element.setAttribute("id", name);
var foo = document.getElementById("fooBar");

//Append the element in page (in span).
foo.appendChild(element);

}

function hideitem(hidethishere) {
document.getElementById(hidethishere).style.display='none';
}

function showitem(showthishere) {
document.getElementById(showthishere).style.display='block';
}

function disableitem(disablethishere) {
document.getElementById(disablethishere).disabled=true;
}

function enableitem(enablethishere) {
document.getElementById(enablethishere).disabled=false;
}

function setloader(theframe,location) {
document.getElementById(theframe).src=location;
//resize_iframe()
}



function UploadFormSubmit(type,id)
{
  window.location="/uploadfiles/"+type+"/"+id;
  
  return true;
}
