﻿function changeContent(id, newPg)
{
	document.getElementById(id).src=newPg;
}
function reSizeFrm(id, ifrm)
{
	obj = document.getElementById(id);
	userAgent = navigator.userAgent;

	if (userAgent.indexOf('MSIE') == -1)
	{
		obj.height=obj.contentDocument.height + 'px';
		document.getElementById('navigation').style.height = obj.contentDocument.height + 'px'; 
	} 
	else 
	{
		document.all(id).style.height = ifrm.document.body.scrollHeight + ifrm.document.body.offsetHeight - ifrm.document.body.clientHeight + 'px';
		document.all('navigation').style.height = ifrm.document.body.scrollHeight + ifrm.document.body.offsetHeight - ifrm.document.body.clientHeight + 'px';
	}
	if (userAgent.indexOf('MSIE') == -1)
	{
		if (obj.contentDocument.height < 400)
		{
			document.getElementById('footer').style.top = '600px'; 
		}
		else
		{
			document.getElementById('footer').style.top = obj.contentDocument.height + 120 + 'px'; 
		}
	}
	else
	{
		if (ifrm.document.body.scrollHeight + (ifrm.document.body.offsetHeight - ifrm.document.body.clientHeight) < 400)
		{
			document.all('footer').style.top = '600px'; 
		}
		else
		{
			document.all('footer').style.top = ifrm.document.body.scrollHeight + ifrm.document.body.offsetHeight - ifrm.document.body.clientHeight + 120 + 'px';
		}
	}
}

function minimizeFrm(id)
{
	userAgent = navigator.userAgent;

	if (userAgent.indexOf('MSIE') == -1)
	{
		document.getElementById(id).height='1px';
	} 
	else 
	{
		document.all(id).style.height='1px';
	}
}

function fadeIn(amt, id)
{
	obj = document.getElementById(id)

    if(amt < 100)
    {
        amt+=2;
		if (obj)
		{ //IE syntax
    		if (obj.filters)
    		{
	        	if (obj.filters[0])
	        	{
			        if (typeof obj.filters[0].opacity=="number") //IE6
			        {
        				obj.filters[0].opacity=amt
		        		//obj.filters[0]="progid:DXImageTransform.Microsoft.Alpha(opacity="+amt+");"
			        }
		        }
    			else //IE 5.5
	    		{
					//	obj.style.filter="alpha(opacity="+amt+")"
					obj.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+amt+");"
		    	}
	    	}
    		else if (typeof obj.style.MozOpacity!="undefined") //Old Mozilla syntax
			obj.style.MozOpacity=amt/100
	    	else if (typeof obj.style.opacity!="undefined") //Standard opacity syntax
    			obj.style.opacity=amt/100
	    	//obj.currentopacity=amt/100
		}
        setTimeout(function(){fadeIn(amt,id)}, 50);
    }
}

function fadeOut(id)
{
	obj = document.getElementById(id)

	if (obj)
	{ //IE syntax
		if (obj.filters)
		{
	       	if (obj.filters[0])
	       	{
		        if (typeof obj.filters[0].opacity=="number") //IE6
		        {
	   				obj.filters[0].opacity=20
	        		//obj.filters[0]="progid:DXImageTransform.Microsoft.Alpha(opacity="+20+");"
		        }
	        }
			else //IE 5.5
	   		{
			//	obj.style.filter="alpha(opacity="+20+")"
	    		obj.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+20+");"
	    	}
	   	}
    		else if (typeof obj.style.MozOpacity!="undefined") //Old Mozilla syntax
			obj.style.MozOpacity=20/100
	    	else if (typeof obj.style.opacity!="undefined") //Standard opacity syntax
    			obj.style.opacity=20/100
	    	//obj.currentopacity=20/100
	}
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

