function compuc() {
		comp = window.open("http://www.compucars.co.uk",'','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=1024,height=768'); 
		comp.blur();
}
	
function writeModelDropDownHome()	{
	document.write('<div class=\"formitem\">Model:<select name=\"Model\" id=\"Model\"><option>Model</option></select></div>');
}

function clearPostCode()
{
	document.searchForm.pcode.value = '';
}

function fillPostCode()
{
	if (document.searchForm.pcode.value.length == 0)
	{
		document.searchForm.pcode.value = 'Post Code (optional)';
	} 
}

function changeMainPic(strImgNum,intVehicleID)
{
	//document.getElementById('MainImage').src = 'http://www.compucars.co.uk/carpics/' + intVehicleID + '-0' + strImgNum + '.jpg';
	//document.getElementById('mainImageLink').href = 'http://www.compucars.co.uk/carpics/Lg' + intVehicleID + '-0' + strImgNum + '.jpg';
}

function linktrack(ID) {
		if(document.images){
			new Image().src="/link.asp?ID=" + ID;
	
		}
		return true;
	}
	
function changeLargeImage(intImageNum)	{
		var iLoop = 1;
		do
		{
			if (iLoop != intImageNum)	
			{
				if (document.getElementById('mainImageLink'+iLoop))	
				{
					document.getElementById('mainImageLink'+iLoop).style.display = 'none';
				}
				
				if (document.getElementById('mainImageEnlargeLink'+iLoop)) 
				{
					document.getElementById('mainImageEnlargeLink'+iLoop).style.display = 'none';
				}
				if (document.getElementById('mainImageEnlargeLinkNormal'+iLoop)) 
				{
					document.getElementById('mainImageEnlargeLinkNormal'+iLoop).style.display = 'none';
				}
			} else
				{
					if (document.getElementById('mainImageLink'+iLoop))	
					{
						document.getElementById('mainImageLink'+iLoop).style.display='inline';
					}
					if (document.getElementById('mainImageEnlargeLink'+iLoop)) 
					{
					document.getElementById('mainImageEnlargeLink'+iLoop).style.display = 'inline';
					}
					if (document.getElementById('mainImageEnlargeLinkNormal'+iLoop)) 
					{
						document.getElementById('mainImageEnlargeLinkNormal'+iLoop).style.display = 'inline';
					}
				}
			iLoop += 1;
		}
		while(iLoop <= 6)
		return true;
	}	
	
function changeEnlargeImageLink(intImageNum,intVehicleID)	{
	if (document.getElementById('mainImageEnlargeLink')) {
		// Used for Large image
		document.getElementById('mainImageEnlargeLink').href = 'http://www.compucars.co.uk/carpics/Lg'+intVehicleID+'-0'+intImageNum+'.jpg';
	}
	
	if (document.getElementById('mainImageEnlargeLinkNormal')) {
		// Used for Normal image
		document.getElementById('mainImageEnlargeLinkNormal').href = 'http://www.compucars.co.uk/carpics/'+intVehicleID+'-0'+intImageNum+'.jpg';
	}
}