

function DeleteFolder() {
	if (window.confirm('Are you sure you want to delete this item and all items filed under it?\n\nThis deletion cannot be undone.')) {
		document.deletefolderform.action = "/edit/folder_delete.asp"
		document.deletefolderform.method = "get"
		document.deletefolderform.submit()
	}
}

function ShowLibrary(DropDown) {
	var lDropDownValue = DropDown.options[DropDown.selectedIndex].value
	if( lDropDownValue > 0 ) {
		var strLibURL = "/edit/folder_files.asp?FolderID=" + lDropDownValue
		var wnl;
		wnl = window.open(strLibURL,'Library','scrollbars=1,height=500,width=400,resizable=1,status=0');
		wnl.focus();
		DropDown.selectedIndex = 0
	}
}

function downloadPopUp(FolderID, FolderName) {
	var x=new Date()
	var msTimeStamp=Date.UTC(x.getFullYear(),x.getDate(),x.getMonth(),x.getHours(),x.getMinutes(),x.getSeconds(),x.getMilliseconds())
	OpenWindow('/edit/update.asp?UTC='+msTimeStamp+'&downloadid=-1&FolderID=' + FolderID + '&FolderName=' + escape(FolderName),'Downloads',600,480,0,1,1)
}

var statusWindow;
		
function OpenStatusWindow() {
	statusWindow = window.open('/users/pleasewait.asp','statusWindow', 'titlebar=no,menubar=no,width=200,height=200,resizable=no,scrollbars=no');
	window.status = 'Submitting....'
}

bIsIE=false;
var bLoad = false;	

// RunSafe function.  All errors sent to black hole.
function rs(code) {
	try { eval(code);
	} catch(oops) {	}
}

function XBrowserAddHandler(target,eventName,handlerName) { 
	try
	{
	if ( target.addEventListener ) {
		target.addEventListener(eventName, eval(handlerName + "()"), false);
	} else if( target.attachEvent ) {
		target.attachEvent("on" + eventName, eval(handlerName + "()"));
	} else { 
		var originalHandler = target["on" + eventName]; 
		if ( originalHandler ) { 
			target["on" + eventName] = function(e) {originalHandler(e);target[handlerName](e);}; 
		} else { 
			target["on" + eventName] = target[handlerName]; 
		}
	} 
  } catch(darn) { }
}

function MM_preloadImages() { //v3.0
  var d=document; if( d.images ) { if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0) { d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function OpenWindow(URLStr, winName, width, height, menubar, scrollbars, resizable) { 
	//newWin = window.open(URLStr, winName, 'toolbar=no,location=no,directories=no,status=no,menubar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable+',copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	newWin = window.open(URLStr, winName, 'toolbar=no,location=no,directories=no,status=no,menubar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable+',copyhistory=yes,width='+width+',height='+height+',left=100, top=200,screenX=100,screenY=200');
	newWin.focus();
}

function PopUp(FolderID) {
	newWin = window.open('/default.asp?PopUp=1&FolderID='+FolderID, 'PopUp', 'toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=500,height=400,left=100,top=200,screenX=100,screenY=200');
	newWin.focus();
}

function openPopUp(URLStr, winName, left, top, width, height, menubar, scrollbars, resizable) { 
	newWin = window.open(URLStr, winName, 'toolbar=no,location=no,directories=no,status=no,menubar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable+',copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	newWin.focus();
}

function goto_URL(object) {
    window.location.href = object.options[object.selectedIndex].value;
}

function checkSearchValue() {
	if (document.QuickSearchForm.keyword.value.length<1) {
		document.QuickSearchForm.keyword.value='Search'
	}
}

function OpenWindowOld(URL, Height, Width) {
	var wn;
	wn = window.open(URL,'BrandServerWindow','scrollbars=1,height=' + Height  + ',width=' + Width + ',resizable=1,status=0');
	wn.focus();
}

MM_preloadImages('')