var initialtab=[1, "sc1"];

var turntosingle=0;

var disabletablinks=0;

var previoustab="";
if (turntosingle==1)
document.write('<style type="text/css">\n#tabcontentcontainer{display: none;}\n</style>');
function expandcontent(cid, aobject){
if (disabletablinks==1)
aobject.onclick=new Function("return false");
if (document.getElementById){
highlighttab(aobject);
if (turntosingle==0){
if (previoustab!="")
document.getElementById(previoustab).style.display="none";
document.getElementById(cid).style.display="block";
previoustab=cid;
}
}
}

function highlighttab(aobject){
if (typeof tabobjlinks=="undefined")
collecttablinks();
for (i=0; i<tabobjlinks.length; i++)
tabobjlinks[i].className="";
aobject.className="current";
}

function collecttablinks(){
var tabobj=document.getElementById("tablist");
tabobjlinks=tabobj.getElementsByTagName("A");
}

function highlight(which,color){
if (document.all||document.getElementById)
which.style.backgroundColor=color;
}


$(document).ready(function() {

	$('img.jsgal').each(function() {
		$(this).removeAttr('width');
		$(this).removeAttr('height');
		$(this).css({width: '350px', cursor: 'pointer'});
	});
	$('img.jsgal').click(function(e) {
		e.preventDefault();
            	var tis=this;
                jQuery('body').append('<div id="timg_overlay"></div>');
                jQuery('#timg_overlay').css({
                    background: '#A0A0A0',
                    display: 'none',
                    height: '100%',
                    left: 0,
                    top: 0,
                    opacity: '0.8',
                    position: 'fixed',
                    width: '100%',
                    zIndex: '99',
                    textAlign: 'center'
                });
                jQuery('body').append('<div id="timg_msg_overlay"></div>');
                jQuery('#timg_msg_overlay').css({
                    zIndex: '100',
                    textAlign: 'center',
                    position: 'fixed',
                    left: 0,
                    top: 0,
                    width: '80%',
                    padding: '50px 10% 50px 10%',
                    fontSize: '20px',
                    display: 'none'
                });
if ($.browser.msie && $.browser.version=='6.0') {
	jQuery('#timg_overlay').css({
		position: 'absolute',
		top: document.getElementsByTagName( 'body' )[0].scrollTop + "px"
	})
	jQuery('#timg_msg_overlay').css({
		position: 'absolute',
		top: document.getElementsByTagName( 'body' )[0].scrollTop + "px"
	})

}

                jQuery('#timg_overlay').fadeIn('normal', function() {
		    var neway=jQuery(tis).attr('src');
                    jQuery('#timg_msg_overlay').html('<img src="'+neway+'">');
                    jQuery('#timg_msg_overlay img').css({
						'background':'#f0f0f0',
						'border':'1px solid #c0c0c0'
					});
					var tmpsh=sewindowHeight();
                    jQuery('#timg_msg_overlay').fadeIn('normal', function() {
						if (tmpsh-100>0)
						{
							tmpsh-=100;
						}
						if (jQuery('#timg_msg_overlay').height()>tmpsh) {
							jQuery('#timg_msg_overlay img').css({'height':tmpsh+'px'});
						}
                        jQuery('#timg_msg_overlay').click(function() {
                            jQuery('#timg_msg_overlay').fadeOut('normal', function() {
                                jQuery('#timg_overlay').fadeOut('normal', function() {
                                    jQuery('#timg_overlay, #timg_msg_overlay').remove();
                                })
                            })
                            return false;
                        });
                    });
                });
                return false;
	});
})

function sewindowHeight() {
var de = document.documentElement;
return self.innerHeight || ( de && de.clientHeight ) || document.body.clientHeight;
}
function sewindowWidth() {
var de = document.documentElement;
return self.innerWidth || ( de && de.clientWidth ) || document.body.clientWidth;
}
