
function dyniframesize(iframename) 
{
	var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1];
	//extra height in px to add to iframe in FireFox 1.0+ browsers
	var FFextraHeight=getFFVersion>=0.1? 16 : 0 ;
	
	var pTar = null;
	if (document.getElementById)
	{
		pTar = document.getElementById(iframename);
	}
	else
	{
		eval('pTar = ' + iframename + ';');
	}
	if (pTar && !window.opera)
	{
		//begin resizing iframe
		pTar.style.display="block"
		
		if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight)
		{
			//ns6 syntax
			pTar.height = pTar.contentDocument.body.offsetHeight+FFextraHeight; 
		}
		else if (pTar.Document && pTar.Document.body.scrollHeight)
		{
			//ie5+ syntax
			pTar.height = pTar.Document.body.scrollHeight;
		}
	}
}

function gg_changeImg(count,id)
{
	for(i=1;i<=count;i++)
	{
		if( document.getElementById('curselectid').value == i )
			continue;
		if( i==id )
			document.getElementById('nav'+i).className = 'ggnavlink_hover_'+i;
		else	
			document.getElementById('nav'+i).className = 'ggnavlink_'+i;
	}
}

function gg_changeframe(count,id,urlpath)
{
	for(i=1;i<=count;i++)
	{
		if( i==id )
			document.getElementById('nav'+i).className = 'ggnavlink_select_'+i;
		else	
			document.getElementById('nav'+i).className = 'ggnavlink_'+i;
	}
	window.location = urlpath;
}

function gg_changeselect()
{
	document.getElementById('nav1').className = 'ggnavlink_1';
	curid = document.getElementById('curselectid').value;
	document.getElementById('nav'+curid).className = 'ggnavlink_select_'+curid;
}

function pm_changeselect()
{
	document.getElementById('nav1').className = 'zxnavlink';
	curid = document.getElementById('curselectid').value;
	document.getElementById('nav'+curid).className = 'zxnavlink_select';
}
function pm_changeframe(count,id,urlpath)
{
	for(i=1;i<=count;i++)
	{
		if( i==id )
			document.getElementById('nav'+i).className = 'zxnavlink_select';
		else	
			document.getElementById('nav'+i).className = 'zxnavlink';
	}
	window.location = urlpath;
}

function TabChange(count,idname,index)
{
	for(var i=1;i<=count;i++)
	{
		document.getElementById(idname+'_title_'+i).className=idname+'_normaltab';
		document.getElementById(idname+'_'+i).className='undis';
	}
	document.getElementById(idname+'_'+index).className='dis';
	document.getElementById(idname+'_title_'+index).className=idname+'_hovertab';
}

function createRequestObject() 
{
    if( navigator.appName == "Microsoft Internet Explorer")
    {
        httpro = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else
    {
        httpro = new XMLHttpRequest();
    }
    return httpro;
}