	
	// SET GLOBAL VARS
	var scrollID = 0;
    var theTop = 18;
    var theHeight = 50;
    var theWidth = 310;
    var theLeft = 0;
    var toClip = 45;
	var clipLimit = 9;
	var showCount = 3;
	var count = 1;
	
    //var pause = false;
    //var position;
	
	// FADE IN NEWS SCROLLER
	function showClip(i, newsDiv) {
		
		// FADE IN THE FIRST FEW CLIPS
		if(i == 1) {
			var time = 0.3;
			for (x=1; x<=showCount; x++) {	
				var ID = 'clip_' + x;		
				
				// SHOW CLIP LAYER
				var identity = document.getElementById(ID);
				if (identity.style) { identity=identity.style; var which=(which=='show')?'visible':(which='show')?'visible':which; }
				identity.visibility = which;
				
				// START EFFECT
				time = (time+0.6);
				Element.hide(ID);
				new Effect.Appear(ID,{duration:time});
			}
			count = showCount;
		}
		else {
			var ID = 'clip_' + i;
			// SHOW CLIP LAYER
			var identity = document.getElementById(ID);
			if (identity.style) { identity=identity.style; var which=(which=='show')?'visible':(which='show')?'visible':which; }
			identity.visibility = which;
			
			Element.hide(ID);
			new Effect.Appear(ID,{duration:0.8});
		}
	}
	
	// DEFINE OBJECT
	function getObject( obj ) {
		var strObj
		if ( document.all ) {
        	strObj = document.all.item( obj );
		} else if ( document.getElementById ) {
        	strObj = document.getElementById( obj );
      	}
		return strObj;
    }


	function scrollNews( newsDiv, toMove ) {
		position = toMove;
		
		// START FADE IN EFFENT
		if (count >= (clipLimit+showCount)) { count = 1; }
		if (count <= clipLimit) { 
			
			// HIDE CLIP AFTER SHOWN FOR SMOOTH TRANSITION
			// PREVENTS FICKER WHEN STARTING OVER
			if (count > showCount) {
				var ID = 'clip_' + (count-showCount);
				var identity = document.getElementById(ID);
				if (identity.style) { identity=identity.style; var which=(which=='hide')?'hidden':(which='hide')?'hidden':which; }
				identity.visibility = which;
			}
			showClip(count, newsDiv); 
		}
		count++;
	
		theDiv = getObject( newsDiv.toString() );
		if ( theDiv == null ) { return; }
		// MOVE CLIP
		if ( document.layers ) {
			theDiv.clip.top = toMove;
			theDiv.clip.bottom = toMove + toClip;
			theDiv.top = theTop - toMove;
		} else {
			theDiv = theDiv.style;
			theDiv.clip = "rect(" + toMove + "px " + (theWidth + theLeft) + "px " + (toMove + toClip) + "px 0px)";
			theDiv.top = theTop - toMove + 'px';
				if ( ( theTop + theHeight - toMove ) < ( theTop - theHeight - 20 ) ) {
					
					toMove = 0;
					if ( document.layers ) {
						theDiv.clip.top = theTop;
						theDiv.clip.bottom = toClip;
						theDiv.top = theTop
					} else {
						theDiv.clip = "rect(" + toMove + "px " + (theWidth + theLeft) + "px " + (toMove + toClip) + "px 0px)";
						theDiv.top = theTop + 'px';
					}
				}
				
			toMove = (toMove + 14);
			position = toMove;
			scrollID = setTimeout("scrollNews('" + newsDiv + "'," + toMove + ")", 3000);
		}
	}
	
	
	function imageSwap(picname, which){
		eval('document.images.' + picname + '.src=' + picname + '_' + which + '.src' );
	}
	
	function resetSearch() {
		if (document.searchForm.words.value == 'search') { 
			document.searchForm.words.value=''; 
		}
	}
	
	var clicked1 = 0;
	var clicked2 = 0;
	var clicked3 = 0;
	var clicked4 = 0;
	var clicked5 = 0;
	
	// CHANGE STYLE 
	function updateCSS(id, newClass1, newClass2) { 
		if (newClass1) {
			var ID = "dropDown" + id;
			var identity = document.getElementById(ID);
			identity.className = newClass1;
		}
		if (newClass2) { 
			var ID = "subject" + id;
			var identity = document.getElementById(ID);
			identity.className = newClass2;
		}
	}
	
	// CHANGE STYLE OF EDITOR PART
	function updateSEClass(id, newClass) { 
		if (newClass) {
			var identity = document.getElementById(id);
			identity.className = newClass;
			return false;
		}
	}