function renderFlash(src, width, height, features) {
	document.writeln('<embed src="' + src + '" quality="high" width="' + width + 
					 '" height="' + height + '" align="middle" allowscriptaccess="sameDomain" ' +
					 'type="application/x-shockwave-flash" ' + features + 
  					 'pluginspage="http://www.macromedia.com/go/getflashplayer" />');
}


var userAgent = window.navigator.userAgent
var isIE = (window.navigator.userAgent.indexOf("MSIE") != -1);
var isFirefox = (window.navigator.userAgent.indexOf("Firefox") != -1);
var isIE6 = (parseFloat(userAgent.substring(userAgent.indexOf("MSIE ") + 5)) <= 6);
var isSafari = (navigator.userAgent.indexOf("Safari") > 0);

function writePngImage(url, width, height, alt) {
	if (!isIE6)
		document.write("<img alt=\"" + alt + "\" src=\"" + url + "\" style=\"width: " + width + "px; height: " + height + "px;\">");
	else
		document.write("<img src=\"spacer.png\" style=\"width: " + width + "px; height: " + height + 
			"px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + url + "', sizingMethod=scale);\">");
}

function writePngClass(url, width, height, alt, className) {
	if (!isIE6)
		document.write("<img alt=\"" + alt + "\" class=\"" + className + "\" src=\"" + url + "\" style=\"width: " + width + "px; height: " + height + "px;\">");
	else
		document.write("<img alt=\"" + alt + "\" class=\"" + className + "\"  src=\"spacer.png\" style=\"width: " + width + "px; height: " + height + 
			"px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + url + "', sizingMethod=scale);\">");
}

function writePngClassLink(url, width, height, alt, className, page_link) {
	if (!isIE6)
		document.write("<a href=\"" + page_link + "\"><img alt=\"" + alt + "\" class=\"" + className + "\" src=\"" + url + "\" style=\"width: " + width + "px; height: " + height + "px;\"></a>");
	else
		document.write("<a href=\"" + page_link + "\"><img alt=\"" + alt + "\" class=\"" + className + "\"  src=\"spacer.png\" style=\"width: " + width + "px; height: " + height + 
			"px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + url + "', sizingMethod=scale);\"></a>");
}

function writePngClassLinkBlank(url, width, height, alt, className, page_link) {
	if (!isIE6)
		document.write("<a href=\"" + page_link + "\" target=\"_blank\"><img alt=\"" + alt + "\" class=\"" + className + "\" src=\"" + url + "\" style=\"width: " + width + "px; height: " + height + "px;\"></a>");
	else
		document.write("<a href=\"" + page_link + "\" target=\"_blank\"><img alt=\"" + alt + "\" class=\"" + className + "\"  src=\"spacer.png\" style=\"width: " + width + "px; height: " + height + 
			"px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + url + "', sizingMethod=scale);\"></a>");
}




function submitForm(id) {
	document.getElementById(id).submit();
	return false;
}

function getCookie( name ) {
  
  var start = document.cookie.indexOf( name + "=" );
  var len = start + name.length + 1;
  if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
    return null;
  }
  if ( start == -1 ) return null;
  var end = document.cookie.indexOf( ";", len );
  if ( end == -1 ) end = document.cookie.length;
  return unescape( document.cookie.substring( len, end ) );
}

function setCookie( name, value, expires, path, domain, secure ) {
  var today = new Date();
  today.setTime( today.getTime() );
  if ( expires ) {
    expires = expires * 1000 * 60 * 60 * 24;
  }
  var expires_date = new Date( today.getTime() + (expires) );
  document.cookie = name + "=" + escape(value) + 
		((expires) ? "; expires=" + expires_date.toGMTString() : "") + 
		((path) ? "; path=" + path : "") + 
		((domain) ? "; domain=" + domain : "") + 
		((secure) ? "; secure" : ""); 
}

function deleteCookie( name, path, domain ) {
  if ( getCookie( name ) ) document.cookie = name + "=" +
    ( ( path ) ? ";path=" + path : "") +
    ( ( domain ) ? ";domain=" + domain : "" ) +
    ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

if (getCookie("FontSize") == null)
	setCookie("FontSize", "normal_text");

function loadFont() {
	var size = getCookie("FontSize");
	document.getElementsByTagName("body")[0].className = size;
	if (size == "small_text")
		document.getElementById("imgSmallerFont").src = "images/text_size_minus_d.jpg";
	else if (size == "large_text")
		document.getElementById("imgLargerFont").src = "images/text_size_plus_d.jpg";
}

function smallerFont(lnkImg) {
	var imgSmallerFont = document.getElementById("imgSmallerFont");
	var imgLargerFont = document.getElementById("imgLargerFont");
	var bodyTag = document.getElementsByTagName("body")[0];
	imgSmallerFont.src = "images/text_size_minus_u.jpg";
	imgLargerFont.src = "images/text_size_plus_u.jpg";
		
	if (getCookie("FontSize") == "normal_text") {
		setCookie("FontSize", "small_text");
		bodyTag.className = "small_text";
		imgSmallerFont.src = "images/text_size_minus_d.jpg";
	} else if (getCookie("FontSize") == "large_text") {
		setCookie("FontSize", "normal_text");
		bodyTag.className = "normal_text";
	} else
		imgSmallerFont.src = "images/text_size_minus_d.jpg";
	return false;
}

function largerFont(lnkImg) {
	var imgSmallerFont = document.getElementById("imgSmallerFont");
	var imgLargerFont = document.getElementById("imgLargerFont");
	var bodyTag = document.getElementsByTagName("body")[0];
	imgSmallerFont.src = "images/text_size_minus_u.jpg";
	imgLargerFont.src = "images/text_size_plus_u.jpg";
		
	if (getCookie("FontSize") == "small_text") {
		setCookie("FontSize", "normal_text");
		bodyTag.className = "normal_text";
	} else if (getCookie("FontSize") == "normal_text") {
		setCookie("FontSize", "large_text");
		bodyTag.className = "large_text";
		imgLargerFont.src = "images/text_size_plus_d.jpg";
	} else
		imgLargerFont.src = "images/text_size_plus_d.jpg";
}

function launchImage(url, width, height, title) {
	if (url != "")
		window.open(url, "preview_image", "width=" + (width + 50) + ", height=" + (height + 50) + ", location=0, menubar=0, resizable=0, scrollbars, status=0, titlebar=1, toolbar=0");
	return false;
}







/***********************************************
* Ajax Includes script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
 
//To include a page, invoke ajaxinclude("afile.htm") in the BODY of page
//Included file MUST be from the same domain as the page displaying it.
 
var rootdomain="http://www.icausa.org"
 
function ajaxinclude(url) {
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.open('GET', url, false) //get page synchronously 
page_request.send(null)
writecontent(page_request)
}
 
function writecontent(page_request){
if (window.location.href.indexOf("http")==-1 || page_request.status==200)
document.write(page_request.responseText)
}
 
