google_ad_client = "pub-5231732569996138";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_channel ="";
google_ad_type = "text";
google_color_border = "00756F";
google_color_bg = "F1EDEE";
google_color_link = "00756F";
google_color_url = "00756F";
google_color_text = "000000";

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

function setCookie(name, value, expires, path, domain, secure) {
	var today = new Date();
	today.setTime( today.getTime() );
	if ( expires ) {
		var expires = expires * 1000 * 60 * 60 * 24;
    	var expires_date = new Date( today.getTime() + (expires) );
    }
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires_date.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

function trackLink(link){
	link.href =link.href+'&tid='+getCookie('tid');
	return true;
}

function opentranslatorpopup(uri) {
	transWin=window.open('https://www.secure-translations.com/' + uri,'win','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=500');
	self.name = 'mainWin';
}

function openordersystem(uri) {
	tid = getCookie('tid');
	orderWin=window.open('https://www.secure-translations.com/client/index.php?d=1&'+ uri +'&tid=' + tid,'orderwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=500');
	self.name = 'mainWin';
}

function openlatintranslations() {
	tid = getCookie('tid');
	latinWin=window.open('https://www.secure-translations.com/latin_client/index.php?d=1&tid=' + tid,'orderwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=800,height=500');
	self.name = 'mainWin';
}

function checkTID() {
	if(tidhidden = document.getElementById('tid')) {
		tidhidden.value = getCookie('tid');
	}
}

var cookieSuccess = function(o){ 
  var response = o.responseText;
  setCookie('mr',response,60);
}; 
	 
var cookieFailure = function(o){ 
  alert(o.responseText);
} 

var cookie_callback = { 
	  success:cookieSuccess, 
	  failure:cookieFailure, 
	  cache:false
};

function do_cookie() {
 
  var cookie_data = getCookie('mr');
  var ref = encodeURIComponent(document.referrer);
  var landing = encodeURIComponent(document.URL);
  var sUrl = 'http://fr.lingo24.com/php/t.php?r='+ref+'&l='+landing+'&d=3';
  if (cookie_data == null) {
    var transaction = YAHOO.util.Connect.asyncRequest('GET', sUrl, cookie_callback, null); 
  }
}