// JavaScript Document
function del(strURL)
{
	if(confirm("Delete Record?"))
	{
		document.location=strURL;
	}
}

function logout(strURL)
{
	if(confirm("Are you sure you want to Logout? (This will delete your login cookie)"))
	{
		document.location=strURL;
	}
}


/*
function logout(strURL)
{
	if(confirm("Are you sure you want to Logout? (This will delete your login cookie)"))
	{
		document.location=strURL;
	}
}
*/


function addLoadEvent(func) {
	  var oldonload = window.onload;
	  if (typeof window.onload != 'function') {
		window.onload = func;
	  } else {
		window.onload = function() {
		  if (oldonload) {
			oldonload();
		  }
		  func();
		}
	  }
	}








function adjustfooter()
{
	
		var vpHeight = window.innerHeight; //Height of Viewport
		//var clHeight = document.documentElement.clientHeight; //IE innerHeight
		var divHeight=document.getElementById("inner_container").scrollHeight; //Working
		var footer = document.getElementById("footer");
		var ua = navigator.userAgent.toLowerCase();
		var browser = navigator.appName.toLowerCase();
		var browserRver = navigator.appVersion;
		//var browserVer = parseFloat(browserRver);
		
		
		var adjustment = Math.round( ((700 - vpHeight)*0.8)+vpHeight-vpHeight );

		
		
		
		
			if(divHeight < 500 && vpHeight < 700)
			{
				footer.style.marginTop = "-40px";
				
				
				//Safari + IE Adjust
				if(ua.indexOf('safari/') != -1 ||  browser.indexOf('explorer/') != -1 )
				
				{
					footer.style.marginTop = ""+ adjustment +"px";
				}
			}
			
			if(divHeight < 500 && vpHeight > 700)
			{
				footer.style.marginTop = "-40px";
			}
			
			if(divHeight > 500 && vpHeight > 700)
			{
				footer.style.marginTop = "0px";
			}
			
		
}
	



function right(e)
{
	//var msg = "Sorry, you don't have permission to right-click.";
	if (navigator.appName == 'Netscape' && e.which == 3) {
	//alert(msg);
	return false;
	}
	if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
	//alert(msg);
	return false;
	}
	else return true;
}

	
function imageprotect() 
{
	if(document.images)
	{
	for(i=0;i<document.images.length;i++)
	  {
	  document.images[i].onmousedown = right;
	  document.images[i].onmouseup = right;
	  }
	}
}	
