str = document.location.search

function numcheck(){
	if(document.form_name.count_display.value=document.form_name.animal_fact.value.length > 160){
		alert("Warning, You have exceeded the total amount of characters");
		return false;
	} else {
	return true;
	}
}

function autoflashfix(fname,fwidth,fheight){
	flash="<embed src='flash/"+fname+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+fwidth+"' height='"+fheight+"' wmode='transparent' menu='false'></embed>";
	document.write(flash);
}

function audioplayer(fname){
	flash = "<embed src='flash/mp3Player.swf?mp3link=http://webpointsolutions.co.uk/audio/"+fname+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='82' height='38' wmode='transparent' menu='false'></embed>";
	document.write(flash);
}

/*function flvplayer(fname){
	flash="<embed src='downloads/video/flvplayer.swf?flvid=http://webpointsolutions.co.uk/video/"+fname+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='342' height='255' wmode='transparent' menu='false'></embed>";
	document.write(flash);
}
*/

function flvplayer(fname){
	flash="<embed src='downloads/video/flvplayer.swf?flvid="+fname+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='342' height='255' wmode='transparent' menu='false'></embed>";
	document.write(flash);
}

function autoflashfix2(fname,fid,fwidth,fheight){
	flash="<embed src='flash/"+fname+"?fid="+fid+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+fwidth+"' height='"+fheight+"' wmode='transparent' menu='false'></embed>";
	document.write(flash);
}

function getgfile(fname,fwidth,fheight){
	flash="<embed src='downloads/game/"+fname+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+fwidth+"' height='"+fheight+"' menu='false'></embed>";
	document.write(flash);
}

function flashbutton(buttonname, buttonlink, buttonheight){
flashnava="<embed src='flash/navigation.swf?bnames="+buttonname+"&blinks="+buttonlink+"' width='173' height='"+buttonheight+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent' menu='false'></embed>";

document.write(flashnava);
}

	  function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }    
}	  function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }    
}

function confirm_ex(val){ 
if (confirm("Delete This Item\n\n OK=Yes - Cancel=No")){ 
window.location=val;
}
} 

window.attachEvent("onload", correctPNG);