
function apImportScript(url)
{
	scriptObj = document.createElement("script");
	scriptObj.src = url;
	scriptObj.type="text/javascript";
	document.getElementsByTagName("head")[0].appendChild(scriptObj);
}

apImportScript("/templates/RapidHealth_01/scripts/ValidateSubmit.js");


//	*********************************************************************************************		CSS Hax


function Ap_importIECssHax()
{
	var browserType = Ap_getBrowserType();
	
	if(browserType == "MSIE 6.0")
	{
		Ap_importCSS("/templates/RapidHealth_01/styles/ie6Hax.css");
	}
	if(browserType == "MSIE 7.0")
	{
		Ap_importCSS("/templates/RapidHealth_01/styles/ie7Hax.css");
	}	
	if(browserType == "MSIE 8.0")
	{
		Ap_importCSS("/templates/RapidHealth_01/styles/ie8Hax.css");
	}		
	/*	
	if(browserType == "Safari")
	{
		Ap_importCSS("/styles/safariHax.css");
	}		
	if(browserType == "Opera")
	{
		Ap_importCSS("/styles/operaHax.css");
	}		
	*/
}

function Ap_importCSS(url)
{
	var head = document.getElementsByTagName("head")[0];

	var newStyle = document.createElement("link");
	newStyle.setAttribute("rel","stylesheet");
	newStyle.setAttribute("type", "text/css");
	newStyle.setAttribute("href", url);

	head.appendChild(newStyle);	
}

function Ap_getBrowserType()
{
	if(navigator.userAgent.indexOf("MSIE 6.0") > -1)
	{
		return "MSIE 6.0";
	}
	if(navigator.userAgent.indexOf("MSIE 7.0") > -1)
	{
		return "MSIE 7.0";
	}	
	if(navigator.userAgent.indexOf("MSIE 8.0") > -1)
	{
		return "MSIE 8.0";
	}	
	if(navigator.userAgent.indexOf("Firefox") > -1)
	{
		return "Firefox";
	}	
	if(navigator.userAgent.indexOf("Safari") > -1)
	{
		return "Safari";
	}	
	if(navigator.userAgent.indexOf("Opera") > -1)
	{
		return "Opera";
	}		
	
	return "unknown";
}

Ap_importIECssHax();
