function showWarningMessage()
{
	alert("\n\n\u00a9 2009 RNR. All Rights Reserved.");
	return false;
}

function getClientHeight()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}

function getClientWidth()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}

var _body = 0;

function ReSize()
{
	var _screen = parseInt(getClientHeight());
	document.getElementById('bottomline').style.marginTop = (((_screen - _body)>0)?(_screen - _body):0) + 20 + 'px';

}
function ReSizeStart(){
	_body = parseInt(document.body.offsetHeight);
	ReSize();
}


//hover start

function checkgrayingsize()
{
	//document.getElementById('graying').style.height = getClientHeight() + 'px';
	document.getElementById('graying').style.height = document.body.scrollHeight + 'px';
	
	document.getElementById('graying').style.width = getClientWidth() + 'px';
	//document.getElementById('graying').style.top = (self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop)) +0+'px';
}

function close_hover()
{
	document.getElementById('graying').style.display = 'none';
	document.getElementById('hover').style.display = 'none';
	document.getElementById('close_hover').style.display = 'none';
}

function hoverboxresize(__w,__h)
{
	if(__w==undefined)__w = 640;
	if(__h==undefined)__h = 380;
	document.getElementById('hover').style.width = __w + 'px';
	document.getElementById('hover').style.height = __h + 'px';
	document.getElementById('hover').style.top = (self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop)) + (getClientHeight()-__h)/2 +'px';
	document.getElementById('hover').style.left = (getClientWidth()-__w)/2 +'px';	
	document.getElementById('close_hover').style.top = (self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop)) + (getClientHeight()-__h)/2 - 10 +'px';
	document.getElementById('close_hover').style.left = getClientWidth()/2+__w/2 - 50 +'px';
}

function opengrayingbox(_type,_src,_w,_h,_desc)
{
	document.getElementById('graying').style.display = 'block';
	document.getElementById('hover').style.display = 'block';
	document.getElementById('close_hover').style.display = 'block';
	checkgrayingsize();
	if(_type=='img'){
	hoverboxresize(_w,_h);
	document.getElementById('hoverflashvideo').innerHTML='<img src="images/'+_src+'" height="'+_h+'" width="'+_w+'">';
	}
	if(_type=='txt'){
		if(_src='this'){
		hoverboxresize(_w,_h);
		_h = parseInt(document.getElementById('texthover').offsetHeight)+10;
		hoverboxresize(_w,_h);
		}
	}
	
	if(_type=='newsframe'){
	document.getElementById('hover').className='hover blue';
	document.getElementById('close_hover').className = 'close_hover close_hover_red';
	//if(document.getElementById('close_hover')!=null) document.getElementById('close_hover').style.display = 'none';
	hoverboxresize(_w,_h);
	var tmp_str='';
	//tmp_str+='<div class="headhover">';
	//tmp_str+='<table cellpadding="0" cellspacing="0" border="0" width="'+(_w-20)+'">';
	//tmp_str+='<tr><td><h1 class="nomargin">'+_desc+'</h1></td><td class="print_td"><a href="javascript:document.getElementById(\'iframe\').contentWindow.focus();javascript:document.getElementById(\'iframe\').contentWindow.print();"><div>PRINT</div></a></td><td class="close_td"><a href="javascript:close_hover()"><div>CLOSE</div></a></td></tr>';
	//tmp_str+='</table>';
	//tmp_str+='</div>';
	tmp_str+='<iframe frameborder="0" src="'+_src+'" width="'+_w+'" id="iframe" height="'+(_h)+'"></iframe>';
	document.getElementById('hover').innerHTML=tmp_str;
	return false;
	}
	

}

function checkhover(){
	if(window.location.search!="")
	{
	var tmp_str=window.location.search;
	var tmp_str1=tmp_str.substring(1,tmp_str.length);

		if(tmp_str!="#"){window.scroll(0,-100);opengrayingbox('newsframe',tmp_str1,920,675,' ');}

	}
}

//hover end

