
var xmlHttp;

function GetXmlHttpObject()
	{
		var xmlHttp=null;
		try
			{
				xmlHttp=new XMLHttpRequest();
			}
		catch (e)
			{
				try
					{
						xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
					}
				catch (e)
					{
						xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
					}
			}
		return xmlHttp;
	}
	
function view(photo)
	{
		document.images["mainimg"].src = photo;
	}
	
function view_list(elID)
	{
		var el = document.getElementById(elID);
		if (el != null)
			{
				//el.scrollIntoView(true);
			}
	}

function wait_dialogue(mode, divid)
	{
		if (mode == "loading")
			{
				if (document.getElementById(divid))
					{
						// for firefox / etc
						document.getElementById(divid).style.opacity = "0.3";
						// for ie
						document.getElementById(divid).style.filter = 'alpha(opacity=30)';
					}
				if (document.getElementById("updating"))
					{
						document.getElementById("updating").style.visibility = "visible";
					}
			}
		if (mode == "loaded")
			{
				if (document.getElementById(divid))
					{
						// for firefox /etc
						document.getElementById(divid).style.opacity = "1";
						// for ie
						document.getElementById(divid).style.filter = 'alpha(opacity=100)';
					}
				if (document.getElementById("updating"))
					{
						document.getElementById("updating").style.visibility = "hidden";
					}
			}
		
	}
	
function init_pp()
	{
		$("a[rel^='prettyPhoto']").prettyPhoto({
			animation_speed: 'instant',
			slideshow: false,
			autoplay_slideshow: false,
			opacity: 0.50,
			show_title: false,
			allow_resize: true,
			theme: 'dark_rounded',
			overlay_gallery: true,
			keyboard_shortcuts: true
		});
	}
	
function gosalvage(makeid)
	{
		window.location = "/repairable-vehicles/go/" + makeid;	
	}
	
function gobreaker(makeid)
	{
		window.location = "/breaking-vehicles/go/" + makeid;	
	}
	
