	var clkone = 1;
	function Browser() {
	var ua,s,i;this.isIE=false;this.isNS=false;this.version=null;
	  ua = navigator.userAgent;
	  s="MSIE";
	  if((i=ua.indexOf(s))>=0){
		this.isIE=true;
	    this.version=parseFloat(ua.substr(i + s.length));
		return;
	  }
          s="Netscape6/";
	  if((i=ua.indexOf(s))>=0){
		this.isNS=true;
		this.version=parseFloat(ua.substr(i+s.length));
	    return;
	  }
	  s="Gecko";
	  if((i=ua.indexOf(s))>=0){
		this.isNS=true;
		this.version=6.1;
	    return;
	  }
        }
	var browser=new Browser();

	function showmenu(elmnt)
	{
	  if (document.all(elmnt) != null) {
	    document.all(elmnt).style.visibility="visible";
	  }
	}
	function hiddenmenu(elmnt)
	{
	  if (document.all(elmnt) != null) {
	     document.all(elmnt).style.visibility="hidden";
	  }
	}
	function doBtn(event, aClsName, fntcolor, bgcolor, bgimg, btntype, elmnt) {
		var doit = event.type;

		if(browser.isIE) {
		  var oEl = event.srcElement;
    		  oEl=window.event.srcElement;
		}
		else {
		  var oEl;
    		  oEl=(event.target.tagName?event.target:event.target.parentNode);
		}
      	  	while (-1 == oEl.className.indexOf( aClsName )) {
       	  		oEl = oEl.parentElement;
      	  		if (!oEl) {
      	  			return;
      	  		}
      	  	}
		if (btntype == "3D") {
		  if (doit == "mouseover" || doit == "mouseup") {
     	  	    oEl.className = "clsBtnOn";
     	  	  } else if (doit == "mousedown") {
     	  	    oEl.className = "clsBtnDown";
     	  	  } else {
     	  	    oEl.className = "clsBtnOff";
     	  	  }
		}
		else if (btntype == "flat") {  //flat
     	  	  if (doit == "mouseover" || doit == "mouseup" || doit == "mousedown") {
     	  	   oEl.className = "clsflatBtnOn";
     	  	  } else {
     	  	   oEl.className = "clsflatBtnOff";
     	  	  }
		}
		else if (btntype == "flatmenu") {
//		  alert(elmnt);
     	  	  if (doit == "mouseover" || doit == "mouseup" || doit == "mousedown") {
     	  	   oEl.className = "clsflatMenuOn";
     	  	  } else {
     	  	   oEl.className = "clsflatMenuOff";
     	  	  }
		  showmenu(elmnt);
		}
		if (fntcolor != '') {
		  oEl.style.color = fntcolor;
		}
		//alert(bgcolor);
		if (bgcolor != '') {
		  oEl.style.background = bgcolor;
		}
		if (bgimg != '') {
		  oEl.style.background = 'url(' + bgimg + ') no-repeat';
		}
	}

	function tboff(event, aClsName, fntcolor,bgcolor,bgimg, btntype, elmnt){
		if(browser.isIE) {
		  var oEl = event.srcElement;
    		  oEl=window.event.srcElement;
		}
  		else {
		  var oEl;
    		  oEl=(event.target.tagName?event.target:event.target.parentNode);
		}
      	  	while (-1 == oEl.className.indexOf( aClsName )) {
		  oEl = oEl.parentElement;
		  if (!oEl) {
		  	return;
		  }
		}
		if (btntype == "3D") {
		  oEl.className = "topBtnOff";
		}
		else if (btntype == "flat") {
		  oEl.className = "flatBtnOff";
		}
		else if (btntype == "flatmenu") {
		  oEl.className = "flatMenuOff";
		  hiddenmenu(elmnt);
		}
		if (fntcolor != '') {
		  oEl.style.color = fntcolor;
		}
		if (bgcolor != '') {
		  oEl.style.background = bgcolor;
		}
		if (bgimg != '') {
		  oEl.style.background = 'url(' + bgimg + ') no-repeat';
		}
	}
	function doTab(event,fntcolor, bgcolor, bgimg, isact) {
		var doit = event.type;

		if(browser.isIE) {
		  var oEl = event.srcElement;
    		  oEl=window.event.srcElement;
		}
		else {
		  var oEl;
    		  oEl=(event.target.tagName?event.target:event.target.parentNode);
		}

      	  	while (-1 == oEl.className.indexOf( "tab" )) {
      	  		oEl = oEl.parentElement;
      	  		if (!oEl) {
      	  			return;
      	  		}
      	  	}
		if (isact == 'True') {
		  oEl.className = "tabOn";
		}
		else
		{
		  oEl.className = "tabOff";
		}

		if (fntcolor != '') {
		  oEl.style.color = fntcolor;
		}
		//alert(bgcolor);
		if (bgcolor != '') {
		  oEl.style.background = bgcolor;
		}
		if (bgimg != '') {
		  oEl.style.background = 'url(' + bgimg + ') no-repeat';
		}
	}

	function clickBtn(gotourl) {
	   if (clkone == 1) {
	     clkone = 0;
//	     alert(gotourl);
	     document.location.href = gotourl;

	   }
	}



$(document).ready(function(){


   $(function() {
        $('#gallery a').lightBox();
   });


});
