﻿function SendEmailGR() { 
theUrl = window.document.location;
window.document.location="mailto:?subject=Αναπτυξιακή%20Κυκλάδων%20Site&body=Επισκευθείτε%20το%20δικτιακό%20τόπο:%20"+escape(theUrl)+"%20της%20Αναπτυξιακής%20Κυκλάδων."
return void(0); 
}

function SendEmailEN() { 
theUrl = window.document.location;
window.document.location="mailto:?subject=Αναπτυξιακή%20Κυκλάδων%20Site&body=Επισκευθείτε%20το%20δικτιακό%20τόπο:%20"+escape(theUrl)+"%20της%20Αναπτυξιακής%20Κυκλάδων."
return void(0); 
}

function SendEmailRU() { 
theUrl = window.document.location;
window.document.location="mailto:?subject=Αναπτυξιακή%20Κυκλάδων%20Site&body=Επισκευθείτε%20το%20δικτιακό%20τόπο:%20"+escape(theUrl)+"%20της%20Αναπτυξιακής%20Κυκλάδων."
return void(0); 
}

function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

 function getPos (obj) {	
	var output = new Object();	
	var mytop=0, myleft=0;	
	while( obj) {		
		mytop+= obj.offsetTop;		
		myleft+= obj.offsetLeft;		
		obj= obj.offsetParent;	
	}	
	output.left = myleft;	
	output.top = mytop;	
	return output;
}

// ********** AJAX helper **********//
var xmlHttp = null;

function getXmlHttpRequest() {
    var ret = null;
    if (window.XMLHttpRequest)
        ret = new XMLHttpRequest();
    else if (window.ActiveXObject)
        ret = new ActiveXObject("Microsoft.XMLHTTP");
    return ret;
}

function RequestServer(url, callback) {
    xmlHttp = getXmlHttpRequest();
    if (xmlHttp) {
		xmlHttp._onreadystatechange = callback;
		xmlHttp.onreadystatechange = onReadyStateChange;
        xmlHttp.open("GET", url, true);
        xmlHttp.send(null);
    }
}

function onReadyStateChange() {
	if(xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete')
		if(typeof(xmlHttp._onreadystatechange) == 'function')
			xmlHttp._onreadystatechange();
}