// JavaScript Document
function Clean_text(txt){
	txt=txt.replace(/\n\r?/g, '<br/>');txt=txt.replace(/&/g, ';AND;');txt=txt.replace(/#/g, ';SHARP;');
	txt=txt.replace(/'/g, ';QUT;');txt=txt.replace(/\+/g, ';PLUS;');return(txt);}

var ctrl;var sft;var x;
document.onkeyup=function(c){
	if(c.which==17){ctrl='off'}if(c.which==16){sft='off';}if(c.which==88){x='off';}}
document.onkeydown=function(d){
	if(d.which==17){ctrl='on'}if(d.which==16){sft='on'}if(d.which==88){x='on'}
	if(ctrl=='on' && sft=='on' && x=='on'){ctrl='off';sft='off';x='off';window.location='cms';}}
//SlideShow
function SlideShow() {
    var $active = $('#slideshow IMG.active');
    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
    var $next =  $active.next().length ? $active.next() : $('#slideshow IMG:first');
    $active.addClass('last-active');
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');})}
//Gallery
function Gallery(site,gal,nmb){document.getElementById('gallery_img').src='media/sites/'+site+'/galleries/'+gal+'/'+nmb+'.jpg';}
