function update_search(){
	if(document.search_form.elements['Category'].value == "[i.e oil pumps]"){ document.search_form.Category.value = ""; }
	if(document.search_form.Model.value == "[i.e golf]"){ document.search_form.Model.value = ""; }
	if(document.search_form.VWPartsNo.value == "[i.e 6N0615301]"){ document.search_form.VWPartsNo.value = ""; }
}


var Material = 20;

function FKImage(Code,Type, Model,Item) {
	cGo = 1;
	if (Material == 20) {Material = 40; }
	else {if (Material == 40) {Material = 0; } 
	else {if (Material == 0) {Material = 8; }
	else {if (Material == 8) {Material = 9;} else {cGo = 0}}}}
	if (cGo == 1) {
	myMaterial = Material + '';
	myMaterial = myMaterial.replace("40","")
	var FullURL = 'UserFiles/Image/FK/close/' + Code + myMaterial + Item + '.jpg'
	} else {
	var FullURL = 'UserFiles/noimage.jpg';
	Material = 20
	}
	return (FullURL);
}


function ViewFK(ID)
	{
	ID = ID.replace('/close','')
	window.open(ID,null,
    "height=400,width=400,status=no,toolbar=no,menubar=no,location=no");
	}
	

function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++)
this[i+1] = initArray.arguments[i];
}
var DOWArray = new
initArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var today = new Date();
var day = DOWArray[today.getDay()+1];

var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000) {
year = year + 1900;
}
function getdate() {
document.getElementById("Volkswagendate").innerHTML = day + ", " + lmonth + " " + date + ", " + year
}

function PickYear() {
    var Manu = document.getElementById("Manufacturer").value;
    document.getElementById("frm2").target = "_blank";
    document.getElementById("frm2").action = "http://www.car-partsonline.co.uk/parts.asp?Manufacturer=" + Manu
    document.getElementById("frm2").submit();
}

  
function startTicker()
{
	// Define run time values
	theCurrentStory     = -1;
	theCurrentLength    = 0;
	// Locate base objects
	if (document.getElementById) {	
		    theAnchorObject     = document.getElementById("tickerAnchor");
			runTheTicker();   	
		 }
	else {
            document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");
            return true;
	}
}

function runTheTicker()
{
	var myTimeout;  
	// Go for the next story data block
	if(theCurrentLength == 0)
	{
		theCurrentStory++;
		theCurrentStory      = theCurrentStory % theItemCount;
		theStorySummary      = theSummaries[theCurrentStory].replace(/&quot;/g,"\"");		
		theTargetLink        = theSiteLinks[theCurrentStory];
		theAnchorObject.href = theTargetLink;
		thePrefix 	     = "<span class=\"tickls\">" + theLeadString + "</span>";
	}
	// Stuff the current ticker text into the anchor
	theAnchorObject.innerHTML = thePrefix + 
	theStorySummary.substring(0,theCurrentLength) + whatWidget();
	// Modify the length for the substring and define the timer
	if(theCurrentLength != theStorySummary.length)
	{
		theCurrentLength++;
		myTimeout = theCharacterTimeout;
	}
	else
	{
		theCurrentLength = 0;
		myTimeout = theStoryTimeout;
	}
	// Call up the next cycle of the ticker
	setTimeout("runTheTicker()", myTimeout);
}
// Widget generator
function whatWidget()
{
	if(theCurrentLength == theStorySummary.length)
	{
		return theWidgetNone;
	}

	if((theCurrentLength % 2) == 1)
	{
		return theWidgetOne;
	}
	else
	{
		return theWidgetTwo;
	}
}

	var theCharacterTimeout = 50;
	var theStoryTimeout     = 4000;
	var theWidgetOne        = "_";
	var theWidgetTwo        = "-";
	var theWidgetNone       = "";
	var theLeadString       = "&nbsp;";

	var theSummaries = new Array();
	var theSiteLinks = new Array();

	var theItemCount = 10;
	
		theSummaries[0] = "Call now for new and secondhand parts ";
		theSiteLinks[0] = "/";
		theSummaries[1] = "We have many VWs, Audis, Seat and Skodas for salvage";
		theSiteLinks[1] = "/";
		theSummaries[2] = "We are currently breaking many VWs, Audis, Seats and Skodas";
		theSiteLinks[2] = "/";
		theSummaries[3] = "New Parts for all makes and models";
		theSiteLinks[3] = "/";
		theSummaries[4] = "We can supply and fit your parts";
		theSiteLinks[4] = "/";
		theSummaries[5] = "3 month warrenty on parts and labour for secondhand parts";
		theSiteLinks[5] = "/";
		theSummaries[6] = "1 year warrenty on parts and labour for new parts";
		theSiteLinks[6] = "/";
		theSummaries[7] = "Have your car regassed £35+VAT";
		theSiteLinks[7] = "/";
		theSummaries[8] = "Full service £95+VAT";
		theSiteLinks[8] = "/";
		theSummaries[9] = "All mechanical work undertaken";
		theSiteLinks[9] = "/";
