	function confirmDelete() 
	{
	
		return confirm('Are you sure you want to delete this item?');
	
	}
	
	function swapImage(obj, img) 
	{
	
		obj.src = img;
		return true;
	
	}

	function closeFrame() 
	{
	
		document.all.mainDiv.style.display = 'none';
		document.all.mainDiv.innerHTML = '<html></html>';
			
	}
	
	function showFrame() 
	{
	
		document.all.mainDiv.style.display = 'inline';
	
	}
	
	function hideDiv(which) 
	{
	
		document.getElementById(which).style.display = 'none';
		document.all.mainDiv.innerHTML = '';
	
	}
	
	function showDiv(which) 
	{
	
		hideDiv(which)
		document.getElementById(which).style.display = 'inline';
	
	}
	
	function loadFrame(loc,wdt,hgt,scr)
	{
	
		var imgLoc = (wdt - 24);
		
		if(scr=='yes')
		{
			imgLoc = (wdt - 41)
		}
		
		document.all.mainDiv.style.top = window.event.y + document.body.scrollTop - 50;
		document.all.mainDiv.style.left = window.event.x - 50;
		document.all.mainDiv.innerHTML = "<IMG alt='Close Window' STYLE='cursor:hand; position:absolute; top:1px; left:" + imgLoc + "px;z-index:1000;' onClick='closeFrame();' border=0 src='../images/close_x.gif'></FONT><iframe style='width:" + wdt + "px;height:" + hgt + "px;' src='" + loc + "' scrolling='" + scr + "' id=mainDivIFrame name=mainDivIFrame frameborder=0></iframe>";
	
	}
	
	function loadFrameRight(loc,wdt,hgt,scr)
	{
	
		var imgLoc = (wdt - 24);
		
		if(scr=='yes')
		{
			imgLoc = (wdt - 41)
		}
		
		document.all.mainDiv.style.top = window.event.y + document.body.scrollTop - 50;
		document.all.mainDiv.style.left = window.event.x - 200;
		document.all.mainDiv.innerHTML = "<IMG alt='Close Window' STYLE='cursor:hand; position:absolute; top:1px; left:" + imgLoc + "px;z-index:1000;' onClick='closeFrame();' border=0 src='../images/close_x.gif'></FONT><iframe style='width:" + wdt + "px;height:" + hgt + "px;' src='" + loc + "' scrolling='" + scr + "' id=mainDivIFrame name=mainDivIFrame frameborder=0></iframe>";
	
	}
	
	function addDetail(invoice_id) 
	{
	
		showFrame();
		loadFrame('add_detail.aspx?invoice_id=' + invoice_id, '385', '200', 'yes');
		document.frames["mainDivIFrame"].location.href=document.frames["mainDivIFrame"].location.href;
	
	}
	
	function addFile(invoice_id) 
	{
	
		showFrame();
		loadFrame('add_file.aspx?invoice_id=' + invoice_id, '385', '200', 'yes');
		document.frames["mainDivIFrame"].location.href=document.frames["mainDivIFrame"].location.href;
	
	}
	
	function createInvoice() 
	{
	
		showFrame();
		loadFrame('create_invoice.aspx', '300', '220', 'yes');
		document.frames["mainDivIFrame"].location.href=document.frames["mainDivIFrame"].location.href;
	
	}
	
	function addFTP(domain) 
	{
	
		showFrame();
		loadFrameRight('add_ftp.aspx?domain=' + domain, '400', '220', 'yes');
		document.frames["mainDivIFrame"].location.href=document.frames["mainDivIFrame"].location.href;
	
	}
	
	function addDatabase(client_id) 
	{
	
		showFrame();
		loadFrameRight('add_database.aspx?client_id=' + client_id, '300', '220', 'yes');
		document.frames["mainDivIFrame"].location.href=document.frames["mainDivIFrame"].location.href;
	
	}