/* Advansys miscellaneous javascript website specific functions */

function EmbedFlash(swf, height, width, loop){
// Main Flash animation - XHTML 1.0 compliant workaround for IE and Firefox (write as javascript rather then embed HTML))
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" id="main01" width="'+width+'" height="'+height+'">');
document.write('<param name="movie" value="'+swf+'"/>');
document.write('<param name="quality" value="high"/>');
document.write('<param name="base" value="/"/>');
document.write('<param name="loop" value="'+loop+'"/>');
document.write('<embed type="application/x-shockwave-flash" src="'+swf+'" width="'+width+'" height="'+height+'"></embed>');
document.write('</object>');	
}
function ShowMap(MapURL,PostCode){
window.open(MapURL+'&pc='+PostCode,'map','width=700, height=500, scrollbars=yes, location=no, status=yes');
}

function RefreshImage(valImageId) {
	var objImage = document.images[valImageId];
	if (objImage == undefined) {
	return;
}
var now = new Date();
	objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
}

var inputs = new Array(0);

function clinput(input) {
found = false;
for (x in inputs){
	if (inputs[x] == input.name) {
		found = true;
	}
}
	if (found == false)	{
		inputs.push(input.name);
		input.value = '';
	}
}

