// @@ GLOBAL VARIABLES

if (top.location != document.location) top.location.replace(document.location);

Cufon.replace('h1', { fontFamily: 'Handel Gothic' });
Cufon.replace('h2', { fontFamily: 'Handel Gothic' });
Cufon.replace('h3', { fontFamily: 'Handel Gothic' });
Cufon.replace('u', { fontFamily: 'Handel Gothic' });

var mainDomain="asm-autos.co.uk";
var siteName="ASM Auto Recycling Limited";
var postcode="OX9+2JB";
var styleSheet="css/default.css";

var gaPageName="";

//translateURL=(document.location.href.indexOf('http://www.asm-autos.co.uk/')!=-1) ? document.location.href : 'http://www.asm-autos.co.uk/';
translateURL='http://www.asm-autos.co.uk/index.htm';
var translateText='<b>Translate:</b><a target="_top" href="http://translate.google.com/translate?hl=pl&sl=en&tl=pl&u='+translateURL+'&anno=0" title="Przetlumacz te strone na jezyk polski."><img border="0" src="http://www.asm-autos.co.uk/images/flag_poland.png" width="22" height="13"></a><a target="_top" href="http://translate.google.com/translate?hl=fr&sl=en&tl=fr&u='+translateURL+'&anno=0" title="Traduire ce site en francais."><img border="0" src="http://www.asm-autos.co.uk/images/flag_france.png" width="22" height="13"></a><a target="_top" href="http://translate.google.com/translate?hl=de&sl=en&tl=de&u='+translateURL+'&anno=0" title="Ubersetzen dieser Website in Deutsch."><img border="0" src="http://www.asm-autos.co.uk/images/flag_germany.png" width="22" height="13"></a><a target="_top" href="http://translate.google.com/translate?hl=nl&sl=en&tl=nl&u='+translateURL+'&anno=0" title="Vertaal deze website in het Nederlands."><img border="0" src="http://www.asm-autos.co.uk/images/flag_netherlands.png" width="22" height="13"></a><a target="_top" href="http://translate.google.com/translate?hl=it&sl=en&tl=it&u='+translateURL+'&anno=0" title="Traduci questo sito in italiano."><img border="0" src="http://www.asm-autos.co.uk/images/flag_italy.png" width="22" height="13"></a><a target="_top" href="http://translate.google.com/translate?hl=es&sl=en&tl=es&u='+translateURL+'&anno=0" title="Traducir esta pagina web en espanol."><img border="0" src="http://www.asm-autos.co.uk/images/flag_spain.png" width="22" height="13"></a><a target="_top" href="'+translateURL+'" title="View the original website (English)."><img border="0" src="http://www.asm-autos.co.uk/images/flag_united_kingdom.png" width="22" height="13"></a>';

function drawEmail(alias,text,dn,title) {
  var at = '&#064;'; // at symbol encoded
  var p1 = '&#109;&#097;&#105;&#108;'; // protocol name encoded part 1
  var p2 = '&#116;&#111;&#58;'; // protocol name encoded part 2
  if (!dn) dn=mainDomain;
  if (title) title=' title="'+title+'"'
    else title='';
  if (!text) text=alias+at+dn;
  document.write('<a href="'+p1+p2+alias+at+dn+'"'+title+'>'+text+'</a>');
}

// start LEGACY Bluesock list 
function showthis(theimage)
{
	if (document.all || document.layers) {
	   var w = screen.availWidth;
	   var h = screen.availHeight;
	}
	var popW = 450, popH = 400;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	appString = "height=" + popH + "," + "width=" + popW + "," + "alwaysRaised=yes" + "," + "scrollbars=no" + "," + "status=no" + "," + "toolbar= no" + "," + "resizable=yes"; //Set up the Dialogue window
	newWin = window.open("http://autos.blue-sock.com/clients/9/image_view.htm?image=" + theimage, "Window1", appString); //Call the Window open 
	newWin.moveTo(leftPos,topPos);
}
// end LEGACY Bluesock list 

function popup(doc,name,scroll,width,height,resize,status,toolbar,locbar,menubar,dirs) {
  var scr = ((scroll) ? ",scrollbars="+scroll : "");
  var wid = ((width) ? ",width="+width : "");
  var hei = ((height) ? ",height="+height : "");
  var res = ((resize) ? ",resizable="+resize : "");
  var sta = ((status) ? ",status="+status : "");
  var too = ((toolbar) ? ",toolbar="+toolbar : "");
  var loc = ((locbar) ? ",location="+locbar : "");
  var men = ((menubar) ? ",menubar="+menubar : "");
  var dir = ((dirs) ? ",directories="+dirs : "");
  remoteWin=window.open(doc,name,scr+wid+hei+res+sta+too+loc+men+dir);
  remoteWin.focus();
}

window.onload = function() {
if (document.getElementById('sm1')) {
  document.getElementById('sm5').onclick = function() {
    popup(this.href,'new',1,700,600,1,0,0,0,0,0);
    return false;
  }
  document.getElementById('sm6').onclick = function() {
    popup(this.href,'new',1,700,400,1,0,0,0,0,0);
    return false;
  }
}
}