    
    
    function popupWindow(myURL){
        var myWin = window.open (myURL, 'PopupWin', 'width=600,height=525,resizable=no,scrollbars=no,status=no');
        myWin.focus();
    }

    function popupAlert(myURL){
    var myWin = window.open (myURL, 'PopupWin', 'width=600,height=525,resizable=no,scrollbars=yes,status=no');
    myWin.focus();
}


    function popupExternalWindow(myURL){
        var myWin = window.open (myURL, 'NewWIndow', '');
        myWin.focus();
    }

    function ppWindow(myURL){
            var myWin = window.open (myURL+'?mode=popup', 'Popup', 'width=700,height=500,scrollbars=yes,status=no,resizable=yes');
            myWin.focus();
    }
					
    function tellafriend(){
        myURL = window.location.href;
        checkURL(myURL)   
        var myWin = window.open ('/' + language + '/tools/tellafriend.asp?URL=' + escape(getURL(myURL)) + '&title=' + escape(document.title), 'TellAFriend', 'width=550,height=400,scrollbars=no,status=no');
        myWin.focus();
    }


     function printPage(){
        qsToAdd = window.location.href; 


        if(qsToAdd.indexOf('?')>0)
        {
            qsToAdd += "&mode=printer" 

        }else{
            qsToAdd += "?mode=printer"
        }
        

        var myWin = window.open (qsToAdd, 'PrintFriendly', 'width=800,height=500,scrollbars=yes,status=no');
        myWin.focus();
    } 
 

    function bookmarkme(title) {
            var ver = navigator.appName;
            var num = parseInt(navigator.appVersion);
            var agt=navigator.userAgent.toLowerCase();
            if ((ver == "Microsoft Internet Explorer")&&(num >= 4)&&(agt.indexOf("mac")==-1)) {
                window.external.AddFavorite(window.location,document.title);
            } else {
                window.alert("To add this page in your bookmark:\r Windows users must press the CTRL+D keys.\r Macintosh users must press the Command+D keys.");
            }
    }


    var pageURL;
    var pageQS;


function _qsElement(qsName, qsValue) {
    this.name   =   qsName;
    this.value  =   qsValue;
}

function checkURL(strURL){


    pageURL = '';
    pageQS = new Array();

    var oRegBS = new RegExp("\\\\", "g");

    strURL = strURL.replace(oRegBS.toString(), "/");

    var oRegHTTP = new RegExp("^http:\/\/", "i");

    
    if (oRegHTTP.test(strURL)) {
        if (strURL.indexOf("?")>0) {
            pageURL = strURL.substring(0, strURL.indexOf("?"));
        }else{
            pageURL = strURL;
        }
    }
      
    var strQueryString = strURL.substring(strURL.indexOf("?")+1, strURL.length);
    var myArrayQS = strQueryString.split("&")
    for(i=0;i<myArrayQS.length;i++){
        var myArgName   =   myArrayQS[i].toLowerCase().substring(0, myArrayQS[i].indexOf("=",0));
        var myArgValue  =   myArrayQS[i].substring(myArrayQS[i].indexOf("=",0)+1, myArrayQS[i].length);
        pageQS[i]       =   new _qsElement(myArgName, myArgValue);
    }
    
}

function getURL(strQS2Add){
    
    var myTempArrayQS;
    var arrToRemove = new Array();
    
    if (typeof(strQS2Add)!='undefined') {
        var myTempArrayQS = strQS2Add.split("&")
        for(i=0;i<myTempArrayQS.length;i++){
            var myArgName   =   myTempArrayQS[i].toLowerCase().substring(0, myTempArrayQS[i].indexOf("=",0));
            var myArgValue  =   myTempArrayQS[i].substring(myTempArrayQS[i].indexOf("=",0)+1, myTempArrayQS[i].length);
            arrToRemove[i]  =   new _qsElement(myArgName, myArgValue);
        }
    }

    var curURL = pageURL;
    var separator = "?";
    
    if (pageQS.length > 0) {
        for (i=0;i<pageQS.length;i++) {
            if (typeof(strQS2Add) != 'undefined') {

                isInRestriction = false;
                for (var j=0;j<arrToRemove.length; j++) {
                    
                    if (arrToRemove[j].name.toLowerCase() == pageQS[i].name.toLowerCase()) {
                        isInRestriction = true;
                        break;
                    }
                }

                if (isInRestriction != true && pageQS[i].name!='') {
                    curURL = curURL + separator + pageQS[i].name + '=' + pageQS[i].value;
                    separator = "&";
                }
            }
        }
    }
    
    if (typeof(strQS2Add)!='undefined') {
        for (var j=0;j<arrToRemove.length; j++) {
            curURL = curURL + separator + arrToRemove[j].name + '=' + arrToRemove[j].value;
            separator = "&";
        }
    }

    return curURL;
}

    function popupLogin(targetObjectID){
        
        var strURL;
        if (targetObjectID==null) {
            strURL = '/' + language+'/security/login.popup.asp?redirect='+currentURL;
        } else {
            strURL = '/' + language+'/security/login.popup.asp?redirect='+targetObjectID;
        }
        var myWin = window.open (strURL, 'Popup', 'width=315,height=200,scrollbars=no,status=no');
        myWin.focus();
    }

    function popupLogout(redirectURL){
        var myWin = window.open ('/' + language+'/security/login.popup.asp?action=LOGOUT', 'Popup', 'width=315,height=200,scrollbars=no,status=no');
        myWin.focus();
    }

    function openWin(wName, wWidth, wHeight, wResize)
    {
      features = 'scrollbars=0,status=0,resizable=' + ((wResize) ? 1 : 0) + ((wWidth) ? ',width=' + wWidth : '') + ((wHeight) ? ',height=' + wHeight : '');
     popWin = window.open('', wName, features);
        if(popWin.focus) { popWin.focus(); }
        return true;
    }

    function formSubmit()
    {
       alert('Coming soon');
    }


    function changeClass(el,strStyle){el.className = strStyle;}


    function doSearch(){
        document.forms[0].submit();
    }

    var flashVersion = 0;
getFlashVersion();


function getFlashVersion() {
    
	var agent = navigator.userAgent.toLowerCase(); 
	
   // NS3 needs flashVersion to be a local variable
   if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
      flashVersion = 0;
   }
   
	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object') { 
			if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
			else if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
			else if (flashPlugin.description.indexOf('5.') != -1) flashVersion = 5;
			else if (flashPlugin.description.indexOf('4.') != -1) flashVersion = 4;
			else if (flashPlugin.description.indexOf('3.') != -1) flashVersion = 3;
		}
	}

	// IE4+ Win32:  attempt to create an ActiveX object using VBScript
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
	   document.write('<scr' + 'ipt language="VBScript"\> \n');
		document.write('on error resume next \n');
		document.write('dim obFlash \n');
		document.write('set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.7") \n');
		document.write('if IsObject(obFlash) then \n');
		document.write('flashVersion = 7 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.6") end if \n');
		document.write('if flashVersion < 7 and IsObject(obFlash) then \n');
		document.write('flashVersion = 6 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.5") end if \n');
		document.write('if flashVersion < 6 and IsObject(obFlash) then \n');
		document.write('flashVersion = 5 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.4") end if \n');
		document.write('if flashVersion < 5 and IsObject(obFlash) then \n');
		document.write('flashVersion = 4 \n');
		document.write('else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.3") end if \n');
		document.write('if flashVersion < 4 and IsObject(obFlash) then \n');
		document.write('flashVersion = 3 \n');
		document.write('end if');
		document.write('</scr' + 'ipt\> \n');
  }
		
	// WebTV 2.5 supports flash 3
	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;

	// older WebTV supports flash 2
	else if (agent.indexOf("webtv") != -1) flashVersion = 2;

	// Can't detect in all other cases
	else {
		flashVersion = flashVersion_DONTKNOW;
	}

	return flashVersion;
}

function ShowFlashAnim (swfFileName, myHeight, myWidth){
    //alert(swfFileName);
    //flashVersion = 2;
    if (flashVersion==6 || flashVersion == 7) {
        
        document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+myWidth+'" HEIGHT="'+myHeight+'" id="" ALIGN="">');
        document.write ('<PARAM NAME="movie" VALUE="' + swfFileName + '"/>');
        document.write ('<PARAM NAME="quality" VALUE="high"/>');
        document.write ('<PARAM NAME="WMode" VALUE="Transparent"/>');
        document.write ('<PARAM NAME="bgcolor" VALUE="#ffffff"/>');
        document.write ('<EMBED src="'+swfFileName+'" quality="high" bgcolor="#ffffff" WIDTH="'+myWidth+'" HEIGHT="'+myHeight+'" NAME="" ALIGN="" TYPE="application/x-shockwave-flash" WMode="Transparent"PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
        document.write ('</OBJECT>');
        
    }else{
        document.write ('<div style="font-size:11px;color:#000000;font-weight:normal">&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_new"><img border="0" src="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif"/></a></div>');
    }
}




flashVersion_DONTKNOW = -1;


