

/* sets the html content of a specified DIV id - cross browser compatible */
function setDivContents(divName, string){
//salert(string);
            var type =          getBrowser();
            var obj               =          getObjectReference(divName);
            if(type == "IE"){
                        obj.innerHTML   =          string;
            }else if(type == "NN"){
                        obj.document.open();
                        obj.document.write(string);
                        obj.document.close();
            }else if(type == "MO" || type == "OP"){
                        obj.innerHTML   =          string;
            }
}

/* Returns the type of browser on the client side */
function getBrowser(){
            var type =          "IE";//set the default type according to most common
            if (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById){
                        type      =          "OP";
            }
            if (document.all){
                        type      =          "IE";
            }
            if (document.layers){
                        type      =          "NN";
            }
            if (!document.all && document.getElementById){
                        type      =          "MO";
            }
            return type;
}

/* get object reference according to browser - mainly used for styling objects */
function getObjectReference(divName){
            var type =          getBrowser();
            var object          =          false;
            if(type == "IE"){
                        object = document.getElementById(divName);
                        //object = document.all[divName];
            }else if(type == "NN"){
                        object = document.layers[divName];
            }else if(type == "MO" || type == "OP"){
                        object = document.getElementById(divName);
            }
            return object;
}

function swap(a,b){
	a.src= b;
	
}
function popwin1(url,name,w,h) { // no scrollbars, not resizable
                      var winW = (screen.width - w) / 2;
                      var winH = (screen.height - h) / 2;
                      window.open(url,name,'width='+w+',height='+h+',top='+winH+',left='+winW+',toolbar=no,location=no,directories=no,menubar=no,status=no,scrollbars=no,resizable=no');
              }
