/*
-----------------------------------------------------
GO global JS library
FileName:    goGlobal.js
Version:     2003-06-06
-----------------------------------------------------
*/

    var zoomWin = null;
    
    
    function toggle( targetId ) {
        if (document.getElementById){
            target = document.getElementById( targetId );
            if (target.style.display == "none") {
                target.style.display = "";
            } else {
                target.style.display = "none";
            }
        }
    }
    
    function goboxcardchanged( targetName, ID ) {
      var targetCreditCard;
      var targetMaestro;
      
      targetCreditCard = document.getElementById( 'maestro_select' + ID );
      targetMaestro = document.getElementById( 'creditcard_select' + ID );
      
      if (document.getElementsByName( targetName )[ID-1].value == 1) {
        targetMaestro.style.display = "none";
        targetCreditCard.style.display = "";
      }
      else {
        targetMaestro.style.display = "";
        targetCreditCard.style.display = "none";
      }
    }

    function showTip( targetId, txt ) {
         if (document.getElementById){
            target = document.getElementById( targetId );
            target.firstChild.nodeValue = txt;
        }
    }
    
    
    function gallery(uri, w, h) {
        var winW, winH, left, top;
        var totalW      = 100+w;
        var totalH      = 60+h;
        var maxWinW     = 800;
        var maxWinH     = 600;
        
        winW = ( totalW > maxWinW ) ? maxWinW : totalW ;
        winH = ( totalH > maxWinH ) ? maxWinH : totalH;
        
        var features = "width="+winW+",height="+winH+",scrollbars=1,resizable=1,menubar=0";
        
        if( zoomWin != null && zoomWin.closed == false ) zoomWin.close();
        
        zoomWin = window.open(uri, "zoomWin", features);
        zoomWin.focus();
    }
    
    function launch_servicecenter(uri) {
        var features = "width=470,height=400,scrollbars=1,resizable=0,menubar=0";
        if( scWin != null && scWin.closed == false ) scWin.close();
        scWin = window.open(uri, "scWin", features);
        scWin.focus();
    }

		function launch_kiosk(uri, kiosk, features) {
			w = window.open(uri, kiosk, features);
			w.focus();
		}