// JavaScript Document

// gets the frame number from the query string, 
// used to get current framenumber of flash file
// when user clicked to go to ne wpage
function getFrameNum()
{
	strReturn = "";
	frame_var = window.location.search.substring(1);
	frame_num = frame_var.split("=");
	if (frame_num[1] != undefined)
		strReturn = frame_num[1];
	else
		strReturn = "0";
	return strReturn;
}

// gets number of days in month
function caldays(m,y)
{
    if(m==01||m==03||m==05||m==07||m==08||m==10||m==12)
	{
		var dmax = 31;			
		return dmax;	        

	}
	else if (m==04||m==06||m==09||m==11)
	{

        var dmax = 30;		
		return dmax;		  

	}
	else
	{

		if((y%400==0) || (y%400==0 && y%100!=0))
		{

			dmax = 29;			
			return dmax;

		}
        else 
        {
            dmax = 28;				
        }
		return dmax;

	}
}
// takes height of one div element and adds to another to make second one longer in height
function setDivHeight(div1, div2)
{
	var buffer = 150;
	var div1Height = document.getElementById(div1).clientHeight;
	var div2Height = document.getElementById(div2).clientHeight;
	
	// check if div1 is greater or equal to div2, if so make div2 longer
	if (div1Height >= div2Height)
	{
		// new height of div element 2
		var newHeight = div2Height + (div1Height - div2Height + buffer);
		// set height
		document.getElementById(div2).style.height = newHeight + 'px';
	}
	// check if div2 is just slighter larger, is so add more to div2
	else if (div2Height > div1Height && div2Height < div1Height+buffer)
	{
		document.getElementById(div2).style.height = (div2Height + buffer) + 'px';
	}
}
// Goggle Analytics

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

var pageTracker = _gat._getTracker("UA-6504787-1");
pageTracker._trackPageview();
