var ownManageCnt=1;
var ownManageTotal=5;
function ownManage() {
	if(ownManageCnt==0) ownManageCnt=5;
	if(ownManageCnt==6) ownManageCnt=1;
	
	for(i=1; i<=ownManageTotal; i++) {
		div=document.getElementById('ownManage'+i);
		div.className='fl dn';
		div=document.getElementById('ownManage'+ownManageCnt)
		div.className='fl';
	}
}

function live_chat(){
	openwin('http://zebra.livechatnow.com/js/enter.php?url=&refer=&name=&email=&dir=&skin=&flag_os=&survey=&survey_lm=&survey_ec=&user=&uid=&sid=&cid=6204&op=&ip=&group=General&q=&track=363761672995855041188384485218&onlinechat=0','500','300');
}

function portfolio(cnt) {
	var portfolioCnt=cnt;
	var portfolioTotal=5;
	
	for(i=1; i<=portfolioTotal; i++) {
		a=document.getElementById('portfolioLink'+i);
		div=document.getElementById('portfolioThumb'+i);
		a.className='off dib';
		div.className='ac dn';
		
		a=document.getElementById('portfolioLink'+cnt);
		div=document.getElementById('portfolioThumb'+cnt);
		a.className='on dib';
		div.className='ac';
	}
}



var servicesCnt=1;
var servicesTotal=8;
function services() {
	if(servicesCnt==0) servicesCnt=8;
	if(servicesCnt==9) servicesCnt=1;
	
	for(i=1; i<=servicesTotal; i++) {
		p=document.getElementById('serviceLink'+i);
		img=document.getElementById('serviceImg'+i);
		div=document.getElementById('serviceDiv'+i);
		p.className='pt5px pb5px w off white';
		img.src=img.src.replace('b1.gif','b2.gif')
		div.className='datas p10px15px aj dn';
		
		p=document.getElementById('serviceLink'+servicesCnt);
		img=document.getElementById('serviceImg'+servicesCnt);
		div=document.getElementById('serviceDiv'+servicesCnt);
		p.className='pt5px pb5px on pr w100 b blue';
		img.src=img.src.replace('b2.gif','b1.gif')
		div.className='datas p10px15px aj';
	}
}


function newsTabs(cnt) {
	var newsTabsCnt=cnt;
	var newsTabsTotal=3;
	
	for(i=1; i<=newsTabsTotal; i++) {
		p=document.getElementById('newsTabsLink'+i);
		div=document.getElementById('newsTabsDiv'+i);
		p.className='off fl p2px10px';
		div.className='p15px pb0px dn';
		
		p=document.getElementById('newsTabsLink'+cnt);
		div=document.getElementById('newsTabsDiv'+cnt);
		p.className='on white fl p2px10px';
		div.className='p15px pb0px';
	}
}

var pop='';
function openwin(nm,width,height) {
	var name=nm;
	if (pop && !pop.closed) {
	   pop.close();
	}
	pop=eval("window.open('"+name+"','NewWIN','chrome[4],toolbar=no,left=5,top=5,width="+width+",height="+height+",directories=no,menubar=no,SCROLLBARS=yes,left=2,right=2')");
	if (!pop.opener) popUpWin.opener = self;
}