 
<!-- For scrolling in new project section-->
function getXmlObject()
{
	var obj=null;
	if(window.XMLHttpRequest)
	{
		obj=new XMLHttpRequest();
	}
	if(window.ActiveXObject)
	{
		obj=new ActiveXObject("Microsoft.XMLHTTP");
	}
	return obj;
}
function folioShow(val)
{
	xmlobject=new getXmlObject();
	if(xmlobject==null)
	{
		alert("Error in processing");
	}
	else
	{
		xmlobject.onreadystatechange=emailcheck;
		xmlobject.open("GET","ajax.php?cat_id="+val,true);
		xmlobject.send(null);
	}
}
function emailcheck()
{
	if(xmlobject.readyState==1 || xmlobject.readyState==2 || xmlobject.readyState==3)
	{
			document.getElementById("folioprojects").innerHTML="<img src='images/icon-loading-animated.gif' alt='folioprojects' />";
 
	}
	if(xmlobject.readyState==4)
	{
			document.getElementById("folioprojects").innerHTML=xmlobject.responseText;
	}
}
function show_this(id)
{
	document.getElementById('set').value=id;
	document.getElementById('1').src='new/icon-loading-animated.gif';
	document.getElementById('1').alt='icon-loading-animated';
	setTimeout('set_this()',2000);
}
function set_this()
{
	document.getElementById('1').src=document.getElementById('set').value;
}
 <!--Ends-->
 
 
 

	animatedcollapse.addDiv('showhide1', 'fade=0,speed=600')
	animatedcollapse.addDiv('showhide2', 'fade=0,speed=600,hide=1')
	animatedcollapse.addDiv('showhide3', 'fade=0,speed=600,hide=1')
	animatedcollapse.addDiv('showhide4', 'fade=0,speed=600,hide=1')
	animatedcollapse.addDiv('showhide5', 'fade=0,speed=600,hide=1')
	animatedcollapse.addDiv('showhide6', 'fade=0,speed=600,hide=1')
	animatedcollapse.init()
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=0;
	a=MM_preloadImages.arguments;
	for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
 
var resolution = document.documentElement.clientWidth;
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
if(resolution==1280)var startX = 414;
else if(resolution==1276)var startX = 411;
else if(resolution==1152)var startX = 351;
else if(resolution==1148)var startX = 348;
else if(resolution==1024)var startX = 287;
else if(resolution==1020)var startX = 284;
else if(resolution==800)var startX = 175;
else if(resolution==796)var startX = 172;
else if(resolution==900)var startX = 225;
else  {
	var intval = parseInt(resolution/100);
	intextera = parseInt(intval-8);
	var multi = (intextera*0.03)+0.22;
	var startX = parseInt(multi*resolution);
}
//set x offset of bar in pixels
var startY = 0 //set y offset of bar in pixels /* #(you could simply remove this variable as it's not needed anymore)# */
var verticalpos="fromtop" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}
 
 
 
 

    	function showmap(){
				//<![CDATA[  43.800697,-79.530222


    		if (GBrowserIsCompatible()) {

      		var map = new GMap(document.getElementById("map"));
map.centerAndZoom(new GPoint(-0.311800,51.511400), 2);//-79.53372,43.79746
}

			var icon = new GIcon();
			icon.image = "mark.png";
			//icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
			//icon.iconSize = new GSize(32, 32);
			icon.shadowSize = new GSize(22, 20);
			icon.iconAnchor = new GPoint(-1, 30);
			icon.infoWindowAnchor = new GPoint(5, 1);
			
	var opt  
	opt = {}  
	
	opt.icon = icon  
	opt.draggable = false ; 
	opt.clickable = true;  
	opt.dragCrossMove = true ; 
			
			 
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
 
var point0 = new GPoint(-0.306000,51.508392);
              var marker1 = new GMarker(point0,opt);

              map.addOverlay(marker1)

              GEvent.addListener(marker1, "click", function() {
marker1.openInfoWindowHtml('<div id="map-add" style="width:289px; height:149px"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><a href="http://maps.google.co.uk/maps?f=q&amp;hl=en&amp;geocode=&amp;q=contagiouscreative&amp;sll=53.800651,-4.064941&amp;sspn=19.143671,57.128906&amp;ie=UTF8&amp;cid=51508287,-305651,10039234074900232482&amp;s=AARTsJrnd_vAHBJU1MAcQCtYvjA0p9wz-Q&amp;ll=51.509918,-0.306759&amp;spn=0.00844,0.021458&amp;z=14&amp;iwloc=A&amp;output=embed" class="linkc">Contagious Creative</a></td><td width="82" rowspan="8"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="left"><img align="left" src="logosite.jpg" alt="logosite" /></td></tr></table></td></tr><tr><td class="text">Ealing Green</td></tr><tr><td class="text">London W5</td></tr><tr><td class="text">020 8123 9907</td></tr><tr><td><a href="http://www.bigslickparty.com" style="color:#008000; font-size:12px; font-family:Verdana; font-weight:bold">contagiouscreative.com</a></td></tr><tr><td>&nbsp;</td></tr><tr><td class="text01">Get directions: <a href="javascript:void(0)" style="color:#0000CC">To here</a> - <a href="javascript:void(0)" style="color:#0000CC">From here</a></td></tr><tr><td valign="top" class="text01"><a href="javascript:void(0)" style="color:#0000CC">Search nearby</a></td></tr></table></div>');
});
    	//]]>

		}
  
<!--////////////////////////////////////////////////////Google map//////////////////////////////////////////////////////////////-->
 

<!-- Begin
function loadImages() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('hidepage').style.display = 'none';
document.getElementById('page').style.display = 'block';
}
else {
if (document.layers) { // Netscape 4
document.hidepage.style.display = 'none';
document.page.style.display = 'block';
}
else { // IE 4
document.all.hidepage.style.display = 'none';
document.all.page.style.display = 'block';
}
}
}

 
function overlay(){
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
  	}
	document.getElementById('c_preview').style.height=yWithScroll+'px';
}
 
function news_scrl()
{	
	document.getElementById('rb2').style.height=document.getElementById('rb1').offsetHeight-25+'px';
}
 // End -->
 
 
 function cleartext()
{ 	
	document.getElementById("user").value="";
}
function clearpass()
{
	document.getElementById("pass").type="password";
	document.getElementById("pass").value="";
}
function fillpass()
{
	if(document.getElementById("pass").value=="")
	{
		document.getElementById("pass").type="text";
		document.getElementById("pass").value="enter password"
	}
}
function fillname()
{
	if(document.getElementById("user").value=="")
	{
		
		document.getElementById("user").value="enter username"
	}
}

/*var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function JSFX_FloatDiv(id, sx, sy)
{
	var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
	var px = document.layers ? "" : "px";
	window[id + "_obj"] = el;
	if(d.layers) el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
 	el.floatIt=function()
	{
		var pX, pY;
 		pY = ns ? pageYOffset :
			(document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
		if(this.sy<0) 
			pY += ns ? innerHeight :
				(document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight);
 		this.cy += (pY + this.sy - this.cy)/8;
		this.style.top = Math.round(this.cy)+px;  
 		setTimeout(this.id + "_obj.floatIt()", 40);
	}
	return el;
}
JSFX_FloatDiv("divTopLeft",startX,startY).floatIt();
 function getYPos(elem) {
	var y = 0;
	while(elem) {
		y += elem.offsetTop;
		elem = elem.offsetParent;
	}
	return y;
}
function currentdiv(divstpos,divname)
{	
	var scrollSteps = 10; // In how many steps to scroll
	var scrollAbove = 133; // How many pixels to leave above the item after scrolling
	var scrollToYPos = (divname=='showhide1' ? 0 : getYPos(document.getElementById(divname))) - scrollAbove;
	var currScrollYPos = ns ? pageYOffset :
		(document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
	var scrollYLeft = scrollToYPos - currScrollYPos;
	for(var stepsLeft=scrollSteps; stepsLeft>0; stepsLeft-- ) {
		var step = scrollYLeft / stepsLeft;
		scrollYLeft -= step;
		window.scrollBy(0, step);
	}
	window.scrollTo(0, scrollToYPos);
	currScrollYPos = scrollToYPos;
	if(divname=='showhide1')
		for(var i=2; i<=6; i++)
			animatedcollapse.hide('showhide'+i,'showhidediv'+i,'showhidedivimage'+i);
	 
}

function hidetitles()
{
	changetitle('ustitle','showhidedivimage2');
	changetitle('skilltitle','showhidedivimage3');
	changetitle('foliotitle','showhidedivimage4');
	changetitle('teamtitle','showhidedivimage5');
	changetitle('contacttitle','showhidedivimage6');
}*/

function changetitle(showimg,hideimg)
{
		document.getElementById(showimg).style.display='';
		document.getElementById(hideimg).style.display='none';
}

function menu1()
				{
					document.getElementById('menu1').className="buttonlink1";
					document.getElementById('menu2').className="uslink";
					document.getElementById('menu3').className="skilllink";
					document.getElementById('menu4').className="foliolink";
					document.getElementById('menu5').className="teamlink";
					document.getElementById('menu6').className="contact_msg";
				}
				
				function menu2()
				{
					document.getElementById('menu1').className="buttonlink";
					if(document.getElementById('ustitle').style.display=="none")
					{
						document.getElementById('menu2').className="uslink1";
					}else{
						document.getElementById('menu2').className="uslink";
					}
					document.getElementById('menu3').className="skilllink";
					document.getElementById('menu4').className="foliolink";
					document.getElementById('menu5').className="teamlink";
					document.getElementById('menu6').className="contact_msg";
				}
				
				
				function menu3()
				{
					document.getElementById('menu1').className="buttonlink";
					document.getElementById('menu2').className="uslink";
					if(document.getElementById('skilltitle').style.display=="none")
					{
						document.getElementById('menu3').className="skilllink1";
					}else{
						document.getElementById('menu3').className="skilllink";
					}
					document.getElementById('menu4').className="foliolink";
					document.getElementById('menu5').className="teamlink";
					document.getElementById('menu6').className="contact_msg";
				}
				
				
				function menu4()
				{
					document.getElementById('menu1').className="buttonlink";
					document.getElementById('menu2').className="uslink";
					document.getElementById('menu3').className="skilllink";
					if(document.getElementById('foliotitle').style.display=="none")
					{
						document.getElementById('menu4').className="foliolink1";
					}else{
						document.getElementById('menu4').className="foliolink";
					}
					document.getElementById('menu5').className="teamlink";
					document.getElementById('menu6').className="contact_msg";
				}
				
				
				
				
				function menu5()
				{
					document.getElementById('menu1').className="buttonlink";
					document.getElementById('menu2').className="uslink";
					document.getElementById('menu3').className="skilllink";
					document.getElementById('menu4').className="foliolink";
					if(document.getElementById('teamtitle').style.display=="none")
					{
						document.getElementById('menu5').className="teamlink1";
					}else{
						document.getElementById('menu5').className="teamlink";
					}
					document.getElementById('menu6').className="contact_msg";
				}
				
				
				
				function menu6()
				{
					document.getElementById('menu1').className="buttonlink";
					document.getElementById('menu2').className="uslink";
					document.getElementById('menu3').className="skilllink";
					document.getElementById('menu4').className="foliolink";
					document.getElementById('menu5').className="teamlink";
					if(document.getElementById('contacttitle').style.display=="none")
					{
						document.getElementById('menu6').className="contact_msg1";
					}else{
						document.getElementById('menu6').className="contact_msg";
					}
				}
