function explode(separator, string) {

	var list = new Array();

	if (separator == null) return false;
	if (string == null) return false;

	var currentStringPosition = 0;
	while (currentStringPosition<string.length) {
		var nextIndex = string.indexOf(separator, currentStringPosition);
		if (nextIndex == -1) break;
		var word = string.slice(currentStringPosition, nextIndex);
		list.push(word);
		currentStringPosition = nextIndex+1;
	}
	if (list.length<1) {
		list.push(string);
	} else {
		list.push(string.slice(currentStringPosition, string.length));
	}
	return list;
} // END func explode()

function tabsAction( sTabId ) {

		$('div.boxTabsContact ul li').each(function () {
			
			if  (this.className == 'tab_hover') {
				this.className = '';
			} 
			if  ( (this.className == 'separator_h') || (this.className == 'separator_lh') ) {
				this.className = 'separator';
			} 
			if  (this.className == 'separator_lasth') {
				this.className = 'separator_last';
			} 

	    });
		
		aTabId = explode ( '_', sTabId );
		
		oTarget = $( 'li#' + sTabId );
		oTarget[0].className = "tab_hover";
		
		if ( ( parseInt( aTabId[1] ) - 1 ) != 0 ) {
			oTargetSeparatorLeft = $( 'li#separator' +  ( parseInt( aTabId[1] ) - 1 ) );
			oTargetSeparatorLeft[0].className = "separator_lh";
		}
		
		oTargetSeparatorRight = $( 'li#separator' +  aTabId[1] );
		
		if ( parseInt( aTabId[1] ) == 6 ) {
			oTargetSeparatorRight[0].className = "separator_lasth";
		} else {
			oTargetSeparatorRight[0].className = "separator_h";	
		}
	
//		$('div.boxTabsContactContent div').each(function () {
//			
//			this.style.display = 'none';
//			
//		});

		$('div.boxTabsContactContent div.box_1').hide();
		$('div.boxTabsContactContent div.box_2').hide();
		$('div.boxTabsContactContent div.box_3').hide();
		$('div.boxTabsContactContent div.box_4').hide();
		$('div.boxTabsContactContent div.box_5').hide();
		$('div.boxTabsContactContent div.box_6').hide();

		$( 'div.box_' + aTabId[1] ).show();
	
}
