function ChSrch(Act)
	{
	if(Act==2)
		{
		Off('ArrSec');
		On('ArrGoo');
		getElm('SrcGoo').style.cursor='default';
		getElm('SrcSec').style.cursor='pointer';		
		getElm('SrcGoo').style.color='#c6913e';						
		getElm('SrcSec').style.color='#e0e0e0';
		
		}
	else if(Act==1)
		{
		On('ArrSec');
		Off('ArrGoo');
		getElm('SrcGoo').style.cursor='pointer';
		getElm('SrcSec').style.cursor='default';				
		getElm('SrcSec').style.color='#c6913e';						
		getElm('SrcGoo').style.color='#e0e0e0';
		}
	getElm('Srch').value=Act;
	}
function ChTop(Act)
	{
	if(Act==2)
		{
		getElm('TbDiv').style.backgroundImage='url(/_Layout/SpecTpTabRgBr.png)';
		getElm('TbTit1').style.cursor='pointer';
		getElm('TbTit2').style.cursor='default';				
		getElm('TbTit2').style.color='#000000';						
		getElm('TbTit1').style.color='#ffffff';
		Off('SwTb1');
		On('SwTb2');		
		}
	else if(Act==1)
		{
		getElm('TbDiv').style.backgroundImage='url(/_Layout/SpecTpTabRgBr2.png)';
		getElm('TbTit1').style.cursor='default';		
		getElm('TbTit2').style.cursor='pointer';				
		getElm('TbTit1').style.color='#000000';						
		getElm('TbTit2').style.color='#ffffff';										
		Off('SwTb2');
		On('SwTb1');				
		}
	}
function On(Elem){document.getElementById(Elem).style.display='';}
function Off(Elem){document.getElementById(Elem).style.display='none';}
function getElm(eID) {return document.getElementById(eID);}
function EMailc(s){var a = false;var res = false;if(typeof(RegExp) == 'function'){var b = new RegExp('abc');if(b.test('abc') == true){a = true;}} if(a == true){reg = new RegExp('^([a-zA-Z0-9\-\.\_]+)'+'(\@)([a-zA-Z0-9\-\.]+)'+'(\.)([a-zA-Z]{2,4})$');res = (reg.test(s));}else{res = (s.search('@') >= 1 && s.lastIndexOf('.') > s.search('@') && s.lastIndexOf('.') >= s.length-5)} return(res);}
function empty(Var){if(Var=='' || Var==undefined || Var=='undefined' || Var==0){return true ; }else{ return false ;}}
//function screenWidth(){if(window.opera){return window.innerWidth}else{return screen.width}}
function screenWidth() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
//    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
//    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
//    myHeight = document.body.clientHeight;
  }
//  window.alert( 'Width = ' + myWidth );
//  window.alert( 'Height = ' + myHeight );
	return myWidth;
}

function setOpacity(eID,opacityLevel) {
  var eStyle = document.getElementById(eID).style;
  eStyle.opacity = opacityLevel / 100;
  eStyle.filter = 'alpha(opacity='+opacityLevel+')';
  }


  function show(eID) {
  getElm(eID).style.display='block';
  }
  function hide(eID) {
  getElm(eID).style.display='none';
  }
	
      function fadeIn(eID,strength) {
		if(getElm(eID).style.opacity!=1)
			{
			if(empty(strength))
				strength=100;
			setOpacity(eID, 0); show(eID); var timer = 0;
			for (var i=1; i<=strength; i++) {
				setTimeout("setOpacity('"+eID+"',"+i+")", timer * 5);
				timer++;
				}
			}
		}
  function fadeOut(eID,CurrentStrength,Callback) 
	{
//	if(getElm(eID).style.opacity==1 || (!empty(CurrentStrength)))
		{
		if(empty(CurrentStrength))
			CurrentStrength=100
		var timer = 0;
		for (var i=CurrentStrength; i>=1; i--) {
			setTimeout("setOpacity('"+eID+"',"+i+")", timer * 3);
			timer++;
			}
		setTimeout("hide('"+eID+"')", 310);
		}
	}
function createRequestObject() {
	try {
		var myRequest = new XMLHttpRequest();
	}
	catch(error) {
		try {
			var myRequest = new ActiveXObject("MSXML2.XMLHTTP");
		}
		catch(error) {
			var myRequest = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	
	return myRequest;
}

