﻿/**************************
Function change sthe src of the img object; pass the img object and the new src
e.g onmouseover=GetHovering(this,'{substring-before(@InActiveImage,',')}') onmouseout="GetHovering(this, '{substring-before(@ActiveImage,',')}')"
 *******************/
 
 function GetHovering(imgObj, newSrc)
{
	imgObj.src = newSrc;
}
 /*******************************************
	Go Home
 *************************************************/
function KaplanCorporateHome()
{

/*	document.location = "/";*/
/*CH requested that the page reloads 20090108*/
	window.location.reload();

}
/*******************************************
	Contact Us page cleint functiona and validation
 *************************************************/
function SelectSpecifyBtn(elemTitle,enableThisValControl, disableThisValControl)
{
	 var elem =  document.getElementsByTagName("input");
	 for(var i=0; i<elem.length; i++)
	 {	 	
	 	if(elem[i].type == "radio" && elem[i].value.indexOf(elemTitle) != -1)
	 	{
	 		elem[i].checked = "checked";
		    SetContactUsSubjectValidation(enableThisValControl, disableThisValControl)
	 		
	 	}
	 }
}
/**********************************
Set validation for subject fields in contactus page
*********************************/
function SetContactUsSubjectValidation(enableThisValControl, disableThisValControl)
{
	 var elem =  document.getElementById(enableThisValControl);
	 ValidatorEnable(elem, true);
	 var elem1 =  document.getElementById(disableThisValControl);
	 ValidatorEnable(elem1, false);	
}
 /**************************
Function call google analytic code
 *******************/
 
 function GoogleCode(urlProtocol)
{
	var gaJsHost = (("https:" == urlProtocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost +"//www.google-analytics.com/urchin.js' type='text/javascript'%3E%3C/script%3E"));
    _uacct = "UA-154380-9";
    urchinTracker();
}
