﻿// JScript File

<!--
        function CheckSearchProvider(){             

            var strbrowser = "NA";
            var strUserAgent = window.navigator.userAgent;
            
            if (strUserAgent.search("Firefox") > -1){
                var strTemp = strUserAgent.substring(strUserAgent.search("Firefox")+8);
                if (strTemp >= 2){
                    strbrowser = "Firefox";
                }//end if
            }else{
                if (strUserAgent.search("MSIE") > -1){
                    var strTemp = strUserAgent.substring(strUserAgent.search("MSIE")+5);
                    var strVersion = strTemp.substring(0, strTemp.search(";"));
                    if (strVersion >= 7){
                        strbrowser = "IE";
                    }//end if
                }//end if
            }//end if
            
            if (strbrowser == "IE"){
                if (window.external.IsSearchProviderInstalled("http://www.warner-criv.com") == 1){
                    document.getElementById("divAd").style.display = 'none';
                }else{

		 	if (readCookie("searchProvider") == true){
                    //document.getElementById("divAd").style.visibility = 'visible';
                    document.getElementById("divAd").style.backgroundColor = "#2C2D82";
                    document.getElementById("divAd").style.height = "30px";
                    document.getElementById("divAd").innerHTML = "<center><a href='javascript:imgSearchProvider_click()'><img src='/images/home/search_providers.jpg' style='border:0' /></a></center>";
			}
			

                }//end if
            }else{
                document.getElementById("divAd").style.display = 'none';
            }//end if
        }//end function
        
        function imgSearchProvider_click(){
            window.external.AddSearchProvider("http://www.warner-criv.com/searchprovider.xml");
            
            window.location = "http://www.warner-criv.com";

        }//end function


	function createCookie(name,value,days) {
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}	
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
		}



	function readCookie(name) {
		if (document.cookie.indexOf("seenSearchProvider") < 0)
		{
			createCookie("seenSearchProvider", "yes", 365);
			return true;
		}
		else 
		{
			return false; 
		}
	
	
	}
//-->