function sendNotifyOption(){
	document.getElementById("emailBox").style.visibility="visible";
}

function fnShowMessage(objectId, classId, message){
	document.getElementById(objectId).style.visibility="visible";
	document.getElementById(objectId).className=classId;
	document.getElementById(objectId).innerHTML=message;
}

function resetMessage(objectID){
	document.getElementById(objectID).style.visibility="hidden";
}	

function fnSubscribe(){
	var emailAddress=document.getElementById("txtEmail").value;
	if ((emailAddress.indexOf("@")==-1)||(emailAddress.indexOf(".")==-1)){
		fnShowMessage('divMessage2','errorTextRed','Please enter a valid Email Address.');
	}
	else{
		var xmlHttp;
		try{
			xmlHttp=new XMLHttpRequest();
		}
		catch(e){
			try{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch(e){
				try{
					xmlHTTP=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch(e){
					fnShowMessage('divMessage2','errorTextRed','Your browser does not support AJAX.');
				}
			}
		}
		xmlHttp.onreadystatechange=function(){
		   	if(xmlHttp.readyState==4){
				var emailReturn=xmlHttp.responseText;
				if (emailReturn=="0"){
					fnShowMessage("divMessage2","successTextGreen2","You have subscribed to our Newsletter!");
				}
				else{
					fnShowMessage("divMessage2","errorTextRed","Your request could not be processed. Please try again later.");
				}
			}
		}
		var emailString="subscribe.php?emailAddress=" + emailAddress;
		xmlHttp.open("GET",emailString,true);
		fnShowMessage("divMessage2","errorTextRed","Thanks Your, We will be in touch shortly");
		xmlHttp.send(null);
	}
	///setTimeout("resetMessage('divMessage2')",5000);

}

function doNotificationSubmit(){
	var emailAddress=document.getElementById("txtEmail").value;
	if ((emailAddress.indexOf("@")==-1)||(emailAddress.indexOf(".")==-1)){
		fnShowMessage('divMessage','errorTextRed','Please enter a valid Email Address.');
	}
	else{
		var xmlHttp;
		try{
			xmlHttp=new XMLHttpRequest();
		}
		catch(e){
			try{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch(e){
				try{
					xmlHTTP=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch(e){
					fnShowMessage('divMessage','errorTextRed','Your browser does not support AJAX.');
				}
			}
		}
		xmlHttp.onreadystatechange=function(){
		   	if(xmlHttp.readyState==4){
				var emailReturn=xmlHttp.responseText;
				if (emailReturn=="0"){
					fnShowMessage("emailBox","successTextGreen2","You will be notified at " + emailAddress + " when the Gallery goes live.");
				}
				else{
					fnShowMessage("divMessage","errorTextRed","Your request could not be processed. Please try again later.");
				}
			}
		}
		var emailString="notify.php?emailAddress=" + emailAddress;
		xmlHttp.open("GET",emailString,true);
		fnShowMessage('divMessage','successTextGreen','Sending...');
		xmlHttp.send(null);
	}
	setTimeout("resetMessage('divMessage')",15000);
}

function clearEmailText(){
	document.getElementById("txtEmail").value="";
}

function showDialog1(){
	document.getElementById("va_dialogbox_content_t1").style.visibility="visible";
	document.getElementById("va_dialogbox_content_t2").style.visibility="hidden";
	document.getElementById("va_dialogbox_content_t3").style.visibility="hidden";
	document.getElementById("va_dialogbox_buttons_b1_bg").className="va_dialogbox_buttons_b1_bg_open";
	document.getElementById("va_dialogbox_buttons_b2_bg").className="va_dialogbox_buttons_b2_bg_closed";
	document.getElementById("va_dialogbox_buttons_b3_bg").className="va_dialogbox_buttons_b3_bg_closed";
	document.getElementById("va_dialogbox_buttons_b1").className="va_dialogbox_buttons_button_open";
	document.getElementById("va_dialogbox_buttons_b2").className="va_dialogbox_buttons_button_closed";
	document.getElementById("va_dialogbox_buttons_b3").className="va_dialogbox_buttons_button_closed";	
}

function showDialog2(){
	document.getElementById("va_dialogbox_content_t1").style.visibility="hidden";
	document.getElementById("va_dialogbox_content_t2").style.visibility="visible";
	document.getElementById("va_dialogbox_content_t3").style.visibility="hidden";
	document.getElementById("va_dialogbox_buttons_b1_bg").className="va_dialogbox_buttons_b1_bg_closed";
	document.getElementById("va_dialogbox_buttons_b2_bg").className="va_dialogbox_buttons_b2_bg_open";
	document.getElementById("va_dialogbox_buttons_b3_bg").className="va_dialogbox_buttons_b3_bg_closed";
	document.getElementById("va_dialogbox_buttons_b1").className="va_dialogbox_buttons_button_closed";
	document.getElementById("va_dialogbox_buttons_b2").className="va_dialogbox_buttons_button_open";
	document.getElementById("va_dialogbox_buttons_b3").className="va_dialogbox_buttons_button_closed";	
}

function showDialog3(){
	document.getElementById("va_dialogbox_content_t1").style.visibility="hidden";
	document.getElementById("va_dialogbox_content_t2").style.visibility="hidden";
	document.getElementById("va_dialogbox_content_t3").style.visibility="visible";
	document.getElementById("va_dialogbox_buttons_b1_bg").className="va_dialogbox_buttons_b1_bg_closed";
	document.getElementById("va_dialogbox_buttons_b2_bg").className="va_dialogbox_buttons_b2_bg_closed";
	document.getElementById("va_dialogbox_buttons_b3_bg").className="va_dialogbox_buttons_b3_bg_open";
	document.getElementById("va_dialogbox_buttons_b1").className="va_dialogbox_buttons_button_closed";
	document.getElementById("va_dialogbox_buttons_b2").className="va_dialogbox_buttons_button_closed";
	document.getElementById("va_dialogbox_buttons_b3").className="va_dialogbox_buttons_button_open";	
}

function changetext(){
		if (!document.getElementById) return
			inc++
		if (inc==0){
			document.getElementById("fader").innerHTML="<p>&quot;Every &pound;100 a business spends on design, it increases turnover by &pound;225.&quot;</p><p align='right'>(Design Council 2007)</p>";
		}
		else if (inc==1){
			document.getElementById("fader").innerHTML="<p>&quot;83% of companies in which design is integral have seen their market share increase, compared to the UK average of 46%.&quot;</p><p align='right'>(Design Council 2007)</p>";
		}
		else if (inc==2){
			document.getElementById("fader").innerHTML="<p>&quot;80% of design-led businesses have opened up new markets in the last three years. Only 42% of UK businesses overall have done so.&quot;</p><p align='right'>(Design Council 2007)</p>";
		}
		else if (inc==3){
			document.getElementById("fader").innerHTML="<p>&quot;A business that increases its investment in design is more than twice as likely to see its turnover grow as a business that does not do so.&quot;</p><p align='right'>(Design Council 2007)</p>";
			inc=-1;
		}
			
		fadingtext()
		setTimeout("changetext()",10000)
}

function changetesti(){
		if (!document.getElementById) return
			inc++
		if (inc==0){
			document.getElementById("fader").innerHTML="<p align='justify'><i>&quot;Thank you BYKATE for a great job, its been a complicated one but youve been truly professional through the whole process making it as easy as possible for us.  Its really valuable for us to have an external design resource which really understands the Travelex brand and we know we can trust.&quot;</i></p><p align='right'>(Travelex)</p>";
		}
		else if (inc==1){
			document.getElementById("fader").innerHTML="<p align='justify'><i>&quot;This is just the solution we needed. We were wasting valuable time and resource trying to format our pitches and nothing looked consist. BYKATE has helped us look the part when pitching, making the team feel more confident, and look more professional. Definitely worth the investment.&quot;</i></p><p align='right'>(GE Money)</p>";
		}
		else if (inc==2){
			document.getElementById("fader").innerHTML="<p align='justify'><i>&quot;Its really important for us reflect a creative and inspiring image from the word go. We needed a fresh pair of eyes to help us inject a new approach to our new business proposals. BYKATE provided just that, giving us great advice and a refreshed look and feel to our documents to help us stand out.&quot;</i></p><p align='right'>(Evolution Partners)</p>";
		}
		else if (inc==3){
			document.getElementById("fader").innerHTML="<p align='justify'><i>&quot;BYKATE interpreted our needs even better than we could imagine, offering a cool calm approach in the design of the logo, but also by stressing the importance of our product when needed in an emergency. BYKATE offers the complete package and is a company we have come to rely on when we need further branded marketing materials.&quot;</i></p><p align='right'>(08000 HelpMe Ltd)</p>";
		}
		else if (inc==4){
			document.getElementById("fader").innerHTML="<p align='justify'><i>&quot;The results we have received working with BYKATE have been fantastic. They were great at guiding us through the process from start to finish, and created a brochure that really fitted our needs. Its really rare to find an agency that take the time to really get to know and understand your business.&quot;</i></p><p align='right'>(Surgery Merchandisers Ltd)</p>";
		}
		else if (inc==5){
			document.getElementById("fader").innerHTML="<p align='justify'><i>&quot;BYKATE have become an important part of our team, giving us great ideas and marketing materials to help us develop our business. We are looking forward to working with BYKATE throughout 2008 and cant wait to see the results!&quot;</i></p><p align='right'>(Primary Asset Finance)</p>";
		inc=-1;
		}

		fadingtext()
		setTimeout("changetesti()",10000)
}

function showGalleryItem(newItem){
	currItem=document.getElementById("txtItem").value;
	currTab=document.getElementById("txtTab").value;
	
	var currButton="gallery_buttons_b" + currItem;
	var currViewer="gallery_viewer_i" + currItem + "_t" + currTab;
	var newButton="gallery_buttons_b" + newItem;
	var newViewer="gallery_viewer_i" + newItem + "_t1";
	
	document.getElementById(currButton).className="gallery_buttons_closed";
	document.getElementById(newButton).className="gallery_buttons_open";
	document.getElementById(currViewer).className="gallery_viewer_description_hidden";
	document.getElementById(newViewer).className="gallery_viewer_description_visible";

	var preview = new Image();
	var previewFileName="images/gallery_p" + newItem + ".jpg";
	preview.src = previewFileName;
	document.getElementById("gallery_preview").src=preview.src;

	document.getElementById("txtItem").value=newItem;
	document.getElementById("txtTab").value="1";
}

function showGalleryItemTab(currItemID, currTabID, newItemID, newTabID){
	var currElementName="gallery_viewer_i" + currItemID + "_t" + currTabID;
	var newElementName="gallery_viewer_i" + newItemID + "_t" + newTabID;
	document.getElementById(currElementName).className="gallery_viewer_description_hidden";
	document.getElementById(newElementName).className="gallery_viewer_description_visible";
	
	document.getElementById("txtTab").value=newTabID;
}