if(path == '') {
	var country = "<a href=\"javascript:toggleLayer('selectcountry');\" title=\"Select Country\"><img class=\"flag\" src=\"http://images.linkcentre.com/flags/" + display_flag + ".gif\" alt=\"" + display_flag + "\" /> Select Country </li></ul><div id=\"selectcountry\"><ul><li><a href=\"javascript:checkCookie('');\"> <div class=\"s-un\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> World Wide</a></li><li><a href=\"javascript:checkCookie('au');\"> <div class=\"s-au\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Austrailia</a></li><li><a href=\"javascript:checkCookie('ca');\"> <div class=\"s-ca\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Canada</a></li><li><a href=\"javascript:checkCookie('cn');\"> <div class=\"s-cn\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> China</a></li><li><a href=\"javascript:checkCookie('fr');\"> <div class=\"s-fr\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> France</a></li><li><a href=\"javascript:checkCookie('de');\"> <div class=\"s-de\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Germany</a></li><li><a href=\"javascript:checkCookie('in');\"> <div class=\"s-in\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> India</a></li><li><a href=\"javascript:checkCookie('ie');\"> <div class=\"s-ie\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Ireland</a></li><li><a href=\"javascript:checkCookie('nl');\"> <div class=\"s-nl\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Netherlands</a></li><li><a href=\"javascript:checkCookie('it');\"> <div class=\"s-it\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Italy</a></li><li><a href=\"javascript:checkCookie('pl');\"> <div class=\"s-pl\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Poland</a></li><li><a href=\"javascript:checkCookie('es');\"> <div class=\"s-es\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Spain</a></li><li><a href=\"javascript:checkCookie('se');\"> <div class=\"s-se\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Sweden</a></li><li><a href=\"javascript:checkCookie('uk');\"> <div class=\"s-uk\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> United Kingdom</a></li><li><a href=\"javascript:checkCookie('us');\"> <div class=\"s-us\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> United States</a></li><li style=\"text-align:right\"><br /><span style=\"color:#fff;\">enter another county code</span><br /><input type=\"text\" name=\"f\" id=\"f\" size=\"2\" maxlength=\"2\"  /><input onclick=\"country_two(this.form);\" type=\"submit\" value=\"enter country\" /><br /><span style=\"color:#fff;\">e.g. NZ for New Zealand</span></li></ul></div>";
} else {


var country = "<a href=\"javascript:toggleLayer('selectcountry');\" title=\"Select Country\"><img class=\"flag\" src=\"http://images.linkcentre.com/flags/" + display_flag + ".gif\" alt=\"" + display_flag + "\" /> Select Country </li></ul><div id=\"selectcountry\"><ul><li><a href=\"" + path + "\"> <div class=\"s-un\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> World Wide</a></li><li><a href=\"/au" + path + "\"> <div class=\"s-au\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Austrailia</a></li><li><a href=\"/ca" + path + "\"> <div class=\"s-ca\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Canada</a></li><li><a href=\"/cn" + path + "\"> <div class=\"s-cn\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> China</a></li><li><a href=\"/fr" + path + "\"> <div class=\"s-fr\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> France</a></li><li><a href=\"/de" + path + "\"> <div class=\"s-de\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Germany</a></li><li><a href=\"/in" + path + "\"> <div class=\"s-in\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> India</a></li><li><a href=\"/ie" + path + "\"> <div class=\"s-ie\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Ireland</a></li><li><a href=\"/nl" + path + "\"> <div class=\"s-nl\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Netherlands</a></li><li><a href=\"/it" + path + "\"> <div class=\"s-it\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Italy</a></li><li><a href=\"/pl" + path + "\"> <div class=\"s-pl\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Poland</a></li><li><a href=\"/es" + path + "\"> <div class=\"s-es\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Spain</a></li><li><a href=\"/se" + path + "\"> <div class=\"s-se\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> Sweden</a></li><li><a href=\"/uk" + path + "\"> <div class=\"s-uk\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> United Kingdom</a></li><li><a href=\"/us" + path + "\"> <div class=\"s-us\" style=\"float:left; margin-top: 1px; margin-right: 4px;\"></div> United States</a></li><li style=\"text-align:right\"><br /><span style=\"color:#fff;\">enter another county code</span><br /><input type=\"text\" name=\"f\" id=\"f\" size=\"2\" maxlength=\"2\"  /><input onclick=\"country_two(this.form);\" type=\"submit\" value=\"enter country\" /><br /><span style=\"color:#fff;\">e.g. NZ for New Zealand</span></li></ul></div>";
}
function country_two (form) {
	
	if (path) {
	
var x = document.getElementById('f').value.replace(/[^a-zA-Z 0-9]+/g,'');
var myurl = '/' + x + path;
 } else {
 	var x = document.getElementById('f').value.replace(/[^a-zA-Z 0-9]+/g,'');
 	setCookie('LC', x, '365');
 	
 	
 	var myurl = '/';
 	
 }
window.location = myurl.toLowerCase();


}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=")
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1 
    c_end=document.cookie.indexOf(";",c_start)
    if (c_end==-1) c_end=document.cookie.length
    return unescape(document.cookie.substring(c_start,c_end))
    } 
  }
return ""
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";domain=.linkcentre.com;path=/;expires="+exdate.toGMTString())
}

function checkCookie(value)
{
country=getCookie('LC')
if (country!=null && country!=""){
setCookie('LC',value,365)
}
else 
  {
  setCookie('LC',value,365)
  if (country!=null && country!="")
    {
    setCookie('LC',value,365)
    }
  }
  if (q) {
  	
  		window.location='./?q=' + q
  	
  	} else {

		window.location='/' . value . window.location.href
	}
}

function getURLParam(strParamName){
  var strReturn = "";
  var strHref = window.location.href;
  if ( strHref.indexOf("?") > -1 ){
    var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
      if (
aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
        var aParam = aQueryString[iParam].split("=");
        strReturn = aParam[1];
        break;
      }
    }
  }
  return unescape(strReturn);
} 

function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}



document.write(country)

