function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


//popUp div start

var amID = "blank";

function showMe(containerId){
    //alert("running");
	if(amID != "blank"){
		hideMe(amID);
	}
	amID = containerId;
	showContainer(containerId);
}
function showContainer(containerId){
	obj = MM_findObj(containerId);
	if (!obj) return;
	obj.style.display = 'block';
}
function hideMe(containerId){
	obj2 = MM_findObj(containerId)
	if (!obj2) return;
	obj2.style.display = 'none';
}

//popUp div end

//change that class then back start

var amClassId = "blank";

function changeClass(Id){
	if(amClassId != "blank"){
		changeBack(amClassId);
	}
	amClassId = Id;
	setClass(Id);
}
function setClass(Id){
	obj = MM_findObj(Id);
	if (!obj) return;
	obj.className = 'dateActive';
}
function changeBack(Id){
	obj2 = MM_findObj(Id)
	if (!obj2) return;
	obj2.className = 'date';
}

//change that class then back end

//clearing form fields start

function ClearInput(value, id){ // This calls our function ClearInput, and the two variables we will need for it to function the original value and the id.

var input = document.getElementById(id); // Gets the input field based on its id.

	if(value == input.value){ // If the default value is equal to the current value.
		input.value = ''; // Empty It.
	}
	
	else{ // Else the value is not equal to the current input field value.
		input.value = input.value; // Leave it the same.
	} // End Else.
} // Close Function.



var c=0;
var t;
var myPro=new Array();
var ProCount = 0;
function timedCount()
{
    if (c == 0){
        document.getElementById(myPro[myPro.length - 1]).style.display= 'none';
        document.getElementById(myPro[c]).style.display= 'block';
    }
    else
    {
        document.getElementById(myPro[c - 1]).style.display= 'none';
        document.getElementById(myPro[c]).style.display= 'block';
    }
    c=c+1;
    if (c == myPro.length){
        c = 0;
    }
    t=setTimeout("timedCount()",3000);
}
function addArray(elementId)
{
    myPro[ProCount] = elementId;
    ProCount=ProCount+1;
}


function MM_openBrWindow(theURL) {
  window.location.href = theURL;
}




//clearing form fields end