<!-- 
//Browser Support Code
function change(targetdiv,getstring){
	var ajaxRequest;  // The variable that makes Ajax possible!
	var ajaxDisplay = document.getElementById(targetdiv);

	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 1){
			ajaxDisplay.innerHTML = '<img src="images/icons/loading.gif">';
		}else if(ajaxRequest.readyState == 4){
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}else{
			ajaxDisplay.innerHTML = '<img src="images/icons/loading.gif">';
		}
	}
	ajaxRequest.open("GET", getstring, true);
	ajaxRequest.send(null); 
	//document.getElementById('focusobject').focus();
}
// <a onClick="change('Div_Name','GET_String');" style="cursor:pointer;">Sample Link</a>
//-->

/*--------------------------------------------------------------------------------------------------------
Text or news scroller
1388-01-08
--------------------------------------------------------------------------------------------------------*/
var theString = new Array(20);
function TextScrollers(){
	for(var c=0;c<20;c++){
		theString[c] = new Array(2);
		//try{
		theString[c]['title'] = document.getElementById('TextScroller_'+c).innerHTML;
		theString[c]['id'] = document.getElementById('TextScroller_'+c+'_ID').innerHTML;
		//}catch(err){theString[c][title]='';}
	}
	ScrolleTheText(0,0);
}
function ScrolleTheText(t, i){
	//alert(i);
	//try{
		var DivSpan = document.getElementById("TextScroller");
		if(i < theString[t]['title'].length){
			var TimeOut = (i==theString[t]['title'].length-1)?3000:50;
			if(i==0){
				DivSpan.innerHTML = '<a id="TextScrollerDiv" href="?id='+theString[t]['id']+'"></a>';
			}
			var Span = document.getElementById("TextScrollerDiv");
			var newSpan = Span.innerHTML;
			Span.innerHTML = newSpan + theString[t]['title'].charAt(i);
			setTimeout("ScrolleTheText("+t+","+(i+1)+")",TimeOut);
		}else if(t < theString.length-1){
			DivSpan.innerHTML = '';
			ScrolleTheText(t+1,0);
		}else{
			DivSpan.innerHTML = '';
			ScrolleTheText(0,0);
		}
	//}catch(err){}
}

/*--------------------------------------------------------------------------------------------------------
Text or news scroller
1388-01-06
--------------------------------------------------------------------------------------------------------*/
var Setting = new Array();
function ChangeTab(BoxID,tabindex){
	Setting[BoxID]['DoScrollTabs'] = 0

	if(Setting[BoxID]['isTab']){
		for(ti=1;ti<=Setting[BoxID]['NumTabs'];ti++){
			document.getElementById(BoxID+ti).className = "ntab";
		}
		document.getElementById(BoxID+tabindex).className = "stab";
	}
	document.getElementById(BoxID).innerHTML = document.getElementById(BoxID+'_'+tabindex).innerHTML
	//document.getElementById(parameter.id).setAttribute("class", "stab");
    //='stab';
    //document.getElementById(parameter.id).style.class='stab';
    //document.td.class="stab";
}
function InitTabs(BoxID,NumTabs,isTab){
	if (typeof isTab == "undefined"){isTab=1;}
	/*
	if(document.getElementById('div_1').innerHTML  !== '&nbsp;'){
		var FirstTab = 1;
	}else if(document.getElementById('div_2').innerHTML  !== '&nbsp;'){
		var FirstTab = 2;
	}else if(document.getElementById('div_3').innerHTML  !== '&nbsp;'){
		var FirstTab = 3;
	}else if(document.getElementById('div_4').innerHTML  !== '&nbsp;'){
		var FirstTab = 4;
	}else{
		var FirstTab = 0;
	}
	*/
	if (isTab == 0){
		for(ti=1;ti<=NumTabs;ti++){
			document.getElementById(BoxID+ti).innerHTML = document.getElementById(BoxID+'__'+ti).innerHTML;
		}
	}
	var TempSetting = new Array();
	TempSetting['CurrentTab'] = 1;
	TempSetting['DoScrollTabs'] = 1;
	TempSetting['NumTabs'] = NumTabs;
	TempSetting['isTab'] = isTab;
	Setting[BoxID] = TempSetting
	ScrollTabs(BoxID);
}
function ScrollTabs(BoxID){
	if(Setting[BoxID]['DoScrollTabs']){
		if(Setting[BoxID]['isTab']){
			for(ti=1;ti<=Setting[BoxID]['NumTabs'];ti++){
				document.getElementById(BoxID+ti).className = "ntab";
			}
			document.getElementById(BoxID+Setting[BoxID]['CurrentTab']).className = "stab";
		}
		document.getElementById(BoxID).innerHTML = document.getElementById(BoxID+'_'+Setting[BoxID]['CurrentTab']).innerHTML;
		Setting[BoxID]['CurrentTab']++;
		if(Setting[BoxID]['CurrentTab']>Setting[BoxID]['NumTabs']){Setting[BoxID]['CurrentTab']=1;}
		setTimeout("ScrollTabs('"+BoxID+"')",10000);
	}
}

