// JavaScript Document

//Credit for this function: http://snipplr.com
function getUrlVars()
{
	//Js does not support asociative arrays, therefore we add a property to the array
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
 	

	if(hashes[0].length > 10){
		
		hash = ['v', ''];
		vars.push(hash[0]);
		vars[hash[0]] = hash[1];
		return vars;
	}
	
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
 
    return vars;
}


vars = getUrlVars();

if(vars['v'] == '' || vars['v'] == 'admin' || vars['v'] == 'order'){

	vars['v'] = 'defaultImg';
	
}
document.getElementById('presentation_img').src = 'img/presentation/'+vars['v']+'.jpg';

