function objDetect (obj) {
	val = document.getElementById(obj);
	if (val) return val;
	else return false;
}


function showSignatureWindow()
{
	var sigWnd = document.getElementById("signature");
	var disWnd = document.getElementById("disable_document");
	var wwidth=(window.innerWidth)?window.innerWidth:((document.all)?document.body.offsetWidth:null);
	var wheight=(window.innerHeight)?window.innerHeight:((document.all)?document.body.offsetHeight:null);
	var scroll = document.body.scrollTop;
	//sigWnd.style.left = (Math.round(wwidth/2) - 260);
	//sigWnd.style.top = (Math.round(wheight/2) + scroll-200);
	//disWnd.style.width = document.body.scrollWidth;
	//disWnd.style.height = document.body.scrollHeight;
	sigWnd.style.display = 'block';
	disWnd.style.display = 'block';
	document.body.scrollTop = scroll;
}

var default_signature_action = '<a href="javascript: hideSignatureWindow(); void(0);" title="Close"><img src="/pic/close.png" width="14" height="14" border="0" alt="Close" title="Close"></a>';
function hideSignatureWindow() {
	 var sigWnd = document.getElementById("signature");
	 var disWnd = document.getElementById("disable_document");
	 disWnd.style.display = 'none';
	 sigWnd.style.display = 'none';
}
function helpLine() {
	var signature = objDetect('signature');
	//signature.style.background="URL('/img/waterSideAssistance.gif') no-repeat left top";
	//signature.style.width = '523px';
	//signature.style.height = '373px';
	var viewport_height 		= document.documentElement.clientHeight;
	var viewport_width 			= document.documentElement.clientWidth;
	var viewport_scrolloffset 	= document.documentElement.scrollTop;
	var top_offset = ((viewport_height/2) - 275) + viewport_scrolloffset;
	signature.style.top = top_offset + 'px';
	
	var disable_document = objDetect("disable_document");
	disable_document.style.height 	= viewport_height + viewport_scrolloffset + 'px';
	disable_document.style.width 	= viewport_width + 'px';

	//showSignatureWindow();
	signature.style.display = 'block';
	disable_document.style.display = 'block';
	
	
}
	
