// JavaScript Document
function tab_content(tab,id,count)
{
		for(i=1;i<=count;i++){
			if(i!=id){
			$("#"+tab+"_"+i).css("display","none");
				document.getElementById(tab+i).className='';	
			}else{
			
			$("#"+tab+"_"+i).css("display","block");
				document.getElementById(tab+i).className='active';	
			}
		}		
}


//--------------------- Content Slider -----------------------------//

function switch_content(type,id,count)
{
		for(i=1;i<=count;i++){
		
		document.getElementById(type+'_'+i).style.background = '';			
		}
		document.getElementById(type+'_'+id).style.background = '';
		
		for(i=1;i<=count;i++){
		document.getElementById(type+i).style.display='none';			
		}
		document.getElementById(type+id).style.display='block';			
}

//--------------------------------------------------------------------//

function createTarget(t){
var left_space = (screen.width/2) - 200;
var top_space = (screen.height/2) - 300;
window.open("", t, 'width=350,height=300,left='+left_space+',top='+top_space);
return true;
}

//-------------------------- switch fadin function --------------------------

function switch_fad(type,id,count,trigger)
{

		for(i=1;i<=count;i++){
			if(i!=id){
			$("#"+type+i).css("display","none");
				document.getElementById(type+'_'+i).className='';	
			}else{
			
			$("#"+type+i).fadeIn("50");
				document.getElementById(type+'_'+i).className='active';	
			}
		}

			if (type=='main'){
			action = trigger;
			}

			if (type=='second'){
			action2 = trigger;
			}			


}



