

var badImages;

function altImage(i,id) {
	document.images[i+5].src="images/spacer.gif";
	if(!badImages) badImages=id+',';
	else badImages=badImages+id+',';
}

function show_image(url){
		
		var link;
		link="view_image.php?url="+url
		window.open(link,'image','width=435 height=350, left=0,top=0,screenx=0,screeny=0,status=no,alwaysraised,menubar=no,directories=no,dependant=no,toolbar=no,scrollbars=yes');
}

function open_quote(){
		
		var link;
		link="freightsure_quote.htm";
		window.open(link,'quote','width=370 height=600, left=0,top=0,screenx=0,screeny=0,status=no,alwaysraised,menubar=no,directories=no,dependant=no,toolbar=no,scrollbars=yes');
}

function write_layer_content(name,content)
	{
		var find = find_layer(name);
		if (find) 
		{
			if (find.layer.innerHTML)
			{
				find.layer.innerHTML = (content);
			}
			else if (find.layer.document.write)
			{
				find.layer.document.open();
				find.layer.document.write(content);
				find.layer.document.close();
			}
		}
	}

	imageNone = new Image(); imageNone.src='images/none.gif';
function no_image(im){

	im=imageNone;

}

function imageLoaded(img) { 
   if (img.width > 200) { 
	   var c=img.width / img.height;
      img.width=200; 
	  img.height=200 / c;
	  imageLoaded(img);
   } 
   if (img.height > 150) { 
	   var c=img.height / img.width;
      img.height=150; 
	  img.width=150 / c;
	  imageLoaded(img);
   } 
} 
function imageError(img) { 
   img.src='http://www.autosonthe.net/images/none.gif'; 
} 

