// JavaScript Document
function MoveTo(page)
{
		switch(page)
		{
			case 1:document.frm.action = "index.htm";
				break;
			case 2:document.frm.action = "about.htm";
				break;
			case 3:document.frm.action = "services.htm";
				break;
			case 4:document.frm.action = "contact.htm";
				break;
				
			default :
					document.frm.action ="#";
		}
		document.frm.submit();
}

function Mail1()
{	
	var error = false;
	var msg = "There are following fields that must be filled to send the mail : \n";
	var inputs = document.frm.getElementsByTagName('input');
	
	for(var i=0;i<inputs.length;i++)
	{
		if(inputs[i].type == 'text' && inputs[i].value == "")
		{			
			msg = msg + inputs[i].name +" \n";
			error = true;			
			document.getElementById('Req'+inputs[i].name).style.display = "";
		}
		if(inputs[i].name == "Email")
		{
			if(inputs[i].value.indexOf("@") < 0 || inputs[i].value.indexOf(".") < 0)
			{
				msg = msg + "Invalid Email address" +" \n";
				error = true;
			}
		}
	}
	
	if(document.frm.Discuss.value == "")
	{
		msg = msg + "Discuss \n";
		error = true;
		document.getElementById('ReqDiscuss').style.display = "";
	}
	
	if(error)
	{
		//alert(msg);
	}
	else
	{
		var Name = document.frm.Name.value;
		var Company = document.frm.Company.value;
		var Address = document.frm.Address.value;
		var Email = document.frm.Email.value;
		var Telephone = document.frm.Telephone.value;
		var Discuss = document.frm.Discuss.value;
		var msgbody;
	
		/*outboundMessage = new SendMail();
		outboundMessage.Smtpserver = "beast";
		outboundMessage.To = "yogesh@webworxindia.com";
		outboundMessage.From = Email;
		outboundMessage.Subject = "Discuss";*/
		msgbody = "Name : " + Name + " \n Comapny : " + Company + " \n Address : " + Address + " \n Email : " + Email + " \n ";
		msgbody = msgbody + "Telephone : " + Telephone + " \n Discussion on : " + Discuss;
		//outboundMessage.send();
		//alert(outboundMessage.Body);*/
		//self.loaction = "mailto:"
		self.location="mailto:janine@theh2.co.uk?subject="+Discuss+"&body="+msgbody;
	}
}

function SetText(text)
{
	//site = "beast";
	site = "www.webworxindia.com";
	//site = "3dbhosting.com";
	//alert(document.getElementById('pages'));
	switch(text)
	{
		case 1:	document.getElementById('CaseHeading').innerHTML = "Brands Hatch Footbridge";
				document.getElementById('CaseText').innerHTML = "Bridgespan were engaged to design and construct a steel superstructure and foundation for a footbridge over the Brands Hatch Superbike Grand Prix track.";
//				document.getElementById('PIC').src = "http://"+site+"/bridgespan/Images/CS_Images/fairclough_bridge_1.gif";
				document.getElementById('PIC').src = "Images/Brands_hatch_footbridge.jpg";
				break;
		case 2:	document.getElementById('CaseHeading').innerHTML = "Farndon Harbour Marina Bridge";
				document.getElementById('CaseText').innerHTML = "A privately-owned public bridge spanning the entrance from the River Trent into Farndon Harbour Marina, Nottinghamshire is a three span footbridge designed and built by Bridgespan in accordance with Department of Transport Specifications and approved by Nottinghamshire County Council.";
//				document.getElementById('PIC').src = "http://"+site+"/bridgespan/Images/CS_Images/Farndon_Bridge.gif";
				document.getElementById('PIC').src = "Images/farndon_harbour.jpg";
				break;
		case 3:	document.getElementById('CaseHeading').innerHTML = "Immingham Viaduct";
				document.getElementById('CaseText').innerHTML = "Bridgespans designers and steel fabricators developed an alternative proposal for the Immingham viaduct which helped to secure the contract.  Bridgespan designers also designed and detailed the foundations to the viaduct.";
				//document.getElementById('PIC').src = "http://"+site+"/bridgespan/Images/CS_Images/DSC01174-IMMINGHAM.gif";
				document.getElementById('PIC').src = "Images/immingham_viaduct.jpg";
				break;
		case 4:	document.getElementById('CaseHeading').innerHTML = "Silverstone Bridge";
				document.getElementById('CaseText').innerHTML = "Bridgespan were engaged to design and construct the steel superstructure and foundations for a foot and vehicle bridge to provide access over the Silverstone Grand Prix race circuit into the pit lane.";
//				document.getElementById('PIC').src = "http://"+site+"/bridgespan/Images/CS_Images/DSCF0001-silverstone.gif";
				document.getElementById('PIC').src = "Images/silverstone_bridge.jpg";	
				break;
		case 5:	document.getElementById('CaseHeading').innerHTML = "Trentham Gardens Footbridge";
				document.getElementById('CaseText').innerHTML = "Bridgespan professionally qualified designers worked to simplify a novated Engineer’s highly theoretical design concept to achieve the required aesthetically pleasing end result but at considerably lower construction cost and with simpler and robust construction details.";
				//document.getElementById('PIC').src = "http://"+site+"/bridgespan/Images/CS_Images/DSC01186-trentham.gif";
				document.getElementById('PIC').src = "Images/trentham_gardens.jpg";
				break;				
	}
/*	for(var i=0;i<=5;i++)
	{
		if(i == text)
			document.getElementById('PIC'+i).style.display = "";
		else
			document.getElementById('PIC'+i).style.display = "none";
	}*/
	//document.getElementById('PIC').height = document.getElementById('pages').height;
}

function SwapImage(id,action)
{
	if(action == 'set')
	{
		document.getElementById('sel_'+id).style.display = "";
		document.getElementById(id).style.display = "none";
	}
	else if(action == 'reset')
	{
		document.getElementById('sel_'+id).style.display = "none";
		document.getElementById(id).style.display = "";
	}
}