function changeClass(mode,v0,v1,v2,v3){	switch(mode){		case"onclick":			document.getElementById('list1'+v0).onmouseout=null;			document.getElementById('menu1'+v0).className='clicked';			if(v0!=v1){				document.getElementById('menu1'+v1).className='inactive';			}					if(v2!=v3 && document.getElementById('menu12'+v2)){				document.getElementById('menu12'+v2).className='clicked';			}					if(v2!=v3 && document.getElementById('menu12'+v3)){				document.getElementById('menu12'+v3).className='inactive';			}			break;		case"onmouseover":			if(v2!=v3 && document.getElementById('menu12'+v2)){				document.getElementById('menu12'+v2).className='hover';			}			break;		case"onmouseout":			if(v2!=v3 && document.getElementById('menu12'+v2)){				document.getElementById('menu12'+v2).className=null;			}			break;	}}function vMenu2(m,v,current){		var menu1array=new Array("top","updates","concept","menu","gallery","staff","qa","shop","blog");		/*reset menu1*/		for(i=0;i<menu1array.length;i++){			if(menu1array[i]!=current){				document.getElementById('menu1'+menu1array[i]).className=null;			}		}		/*reset menu12*/		document.getElementById('menu12qa').className='menu12 hidden';		document.getElementById('menu12updates').className='menu12 hidden';		document.getElementById('menu12gallery').className='menu12 hidden';		/*activate selected menu1 and menu12*/		if(m=='v' ){			if(v!=current){				document.getElementById('menu1'+v).className='hover';			}			if(document.getElementById('menu12'+v)){				document.getElementById('menu12'+v).className='menu12';				document.getElementById('menu12'+v).style.top='54px';			}		}}function switchGalleryPhoto(v,name,iconno,iconcnt,hm,vm,m2){	var targetImg=document.getElementById('workphoto0');	//targetImg.src=null;	targetImg.className='visible0';	var newImage = new Image();	newImage.onload = function() {		//targetImg.style.marginLeft=hm;		//targetImg.style.marginTop=vm;		targetImg.src = newImage.src;		setTimeout('showimg()',1);			document.getElementById('staffname').innerHTML='Stylist : '+name;		for(i=0;i<iconcnt;i++){			document.getElementById(m2+'_'+i).className=m2+'individual';		}		document.getElementById(m2+'_'+iconno).className=m2+'individual active';	};	newImage.src = '../../upload/'+m2+'/'+v+'?t='+(new Date()).getTime();}function switchEventPhoto(v,name,iconno,iconcnt,hm,vm,m2){	var targetImg=document.getElementById('workphoto0');	//targetImg.src=null;	targetImg.className='visible0';	var newImage = new Image();	newImage.onload = function() {		//targetImg.style.marginLeft=hm;		//targetImg.style.marginTop=vm;		targetImg.src = newImage.src;		setTimeout('showimg()',1);		};	newImage.src =v+'?t='+(new Date()).getTime();}function showimg(){	document.getElementById('workphoto0').className='visible1';	initImage('workphoto0',100,25);}function switchStaffPhoto(v,c,name){	document.getElementById('workphoto'+v).className='visible0';	document.getElementById('staffname').innerHTML=name;	for(i=0;i<c;i++){		document.getElementById('workphoto'+i).className='visible0';		document.getElementById('staff'+i).className=null;	}	document.getElementById('workphoto'+v).className='visible';	document.getElementById('staff'+v).className='active';	initImage('workphoto'+v,100,25);}function switchPhoto(v,c) {	document.getElementById('workphoto'+v).className='visible0';	for(i=0;i<c;i++){		document.getElementById('workphoto'+i).className='visible0';		////document.getElementById('button'+i).className='btnactive0';		//document.getElementById('button'+i).src='../../../images/workbtn0.gif';		document.getElementById('button'+i).className='workbtn0';	}	////document.getElementById('button'+v).className='btnactive1';	//document.getElementById('button'+v).src='../../../images/workbtn1.gif';	//document.getElementById('button'+i).className='workbtn1';	document.getElementById('button'+v).className='workbtn1';	document.getElementById('workphoto'+v).className='visible1';	initImage('workphoto'+v,100,25);}window.onload = function() { 	initImage('workphoto0',100,25);}function showhide(v){	if(target=document.getElementById(v)){		str=target.className;		z_slidebox(v);		if(str.match("v0")){			target.className=str.replace(/v0/,"v1");		} else {			target.className=str.replace(/v1/,"v0");		}	}}function z_slidebox(v){	if ($("#"+v).is(":hidden")) {		$("#"+v).slideDown("fast");	} else {		$("#"+v).slideUp("fast");	}}function initImage(v,m,d) {  image = document.getElementById(v);  setOpacity(image, 0);  image.style.visibility = 'visible';  fadeIn(v,0,m,d);}function setOpacity(obj, opacity) {  opacity = (opacity == 100)?99.999:opacity;  // IE/Win  obj.style.filter = "alpha(opacity:"+opacity+")";  // Safari<1.2, Konqueror  obj.style.KHTMLOpacity = opacity/100;  // Older Mozilla and Firefox  obj.style.MozOpacity = opacity/100;  // Safari 1.2, newer Firefox and Mozilla, CSS3  obj.style.opacity = opacity/100;}function fadeIn(objId,opacity,maxopacity,duration) {	if (document.getElementById) {		obj = document.getElementById(objId);		if (opacity <= maxopacity) {			setOpacity(obj, opacity);			opacity += duration;			window.setTimeout("fadeIn('"+objId+"',"+opacity+","+maxopacity+","+duration+")", 100);			if(opacity>0 && opacity<90){					//document.getElementById('imagebox').style.backgroundImage="url(images/loading.gif)";			} else {				//document.getElementById('imagebox').style.backgroundImage="url(images/loading.gif)";			}					}	}}function crSwfCode(SWFFILE,FW,FH){ var rdata='<object data='+SWFFILE+' width='+FW+' height='+FH+' type="application/x-shockwave-flash"><param name="movie" value='+SWFFILE+' /><param name="wmode" value="transparent" /></object>'; document.write(rdata); }function controlPopup(m,v){	switch(m){		case"show":			document.getElementById('workpopup'+v).className='visible1';			break;		case"hide":			document.getElementById('workpopup'+v).className='visible0';			break;	}}