﻿


function Addwin(page) {
      OpenWin = this.open(page, "_blank", 'toolbar=no,location=no,directories=0,status=0,menubar=0,scrollbars=no,resizable=yes,width=210,height=120');
   } 


function nbWin(page,winname,sw,sh) {
      OpenWin = this.open(page, winname, 'toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=yes,width='+sw+',height='+sh);
   }
function gStart(page,sw,sh) {
      OpenWin = this.open(page, "_blank", 'toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=auto,resizable=yes,width=800,height=560');
   }




function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
else 
window.sidebar.addPanel(title, url, "")
}



function menu(list) 
{ 
location.href = list.options[list.selectedIndex].value
}


   function Newpop(page,sw,sh,slf,stp,scr) {

      OpenWin = this.open(page, "_blank",
'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+scr+',resizable=yes,left='+slf+',top='+stp+',width='+sw+',height='+sh);

   } 


   function getReq (url, params, typos) {
	var params = params;
	if (!url) {document.getElementById(params).innerHTML = ""; return;}
	var randomnumber=Math.floor(Math.random()*101);
	if (url.indexOf('=')!=-1){url = url + "&noc2=" + randomnumber;}


      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }


      http_request.onreadystatechange = function() {alertConts(params,typos);};
      http_request.open('GET', url, true);
      http_request.send(null);

   }



   function alertConts(par,typ) {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
             result = http_request.responseText;
		if (typ == "ret"){document.getElementById(par).value = result;}
		else if (!par){}
		else{document.getElementById(par).innerHTML = result;}
         } else {
           // alert('There was a problem with the GET request.');
         }
      }
   }







// The MYLIST PACKAGE



var listadim = "<div class=listadim>&nbsp;</div>";
var listrmim = "<div class=listrmim>&nbsp</div>";

var path = "/";
var domain = ".interkriti.org";
var secure = "";


//the comments section
function Add_Com (dfo,coms,df) {
var coms;
var df;
if (coms.length >150) {alert ("Text too long"); return false;}
coms = coms.replace(/<font color=444444><u>Add Notes:<\/u><\/font>/, "");

function getCookie(NameOfCookie)
{ if (document.cookie.length > 0)
{ begin = document.cookie.indexOf(NameOfCookie+"=");
if (begin != -1)
{ begin += NameOfCookie.length+1;
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end)); }
}
return "";
}


if (!coms) {var this_comm = getCookie(dfo) + coms;}
else {var this_comm = coms}



var forin ;
forin = "<form style=\"margin:0px;\">";
forin += "<textarea class=\"forin\" onMouseOver=this.focus(); wrap=physical onkeyup=\"countMe(this.value)\";  rows=2 onBlur=\"Add_Com('"+dfo +"', this.value,'divin')\">"; 
forin += this_comm + "</textarea><input type=submit value=Done class=bve10></form>";
this.focus();

if (!this_comm){this_comm="<font color=444444><u>Add Notes:<\/u><\/font>"}

if (df == "forin") {
forin = forin.replace(/<br>/g, "\n");
document.getElementById(dfo).innerHTML = forin;

}
else {
var divin;
var expires;
divin = "<div class=\"divin\" class=bve11  onclick=\"Add_Com('"+dfo +"','','forin');\">"; 


if (coms== "" && df == "divin") {this_comm = "<font color=444444><u>Add Notes:<\/u><\/font>"; expires = "-10"}
else {expires = "90";}
divin += this_comm + "</div>";
divin = divin.replace(/\n/g, "<br>");
if(document.getElementById(dfo)){
	document.getElementById(dfo).innerHTML = divin;
	}
var today = new Date();
today.setTime( today.getTime() );


if (this_comm == "<font color=444444><u>Add Notes:<\/u><\/font>") {this_comm = ""; expires = "-10"}
expires = expires * 1000 * 60 * 60 * 24;
var expires_date = new Date( today.getTime() + (expires) );
this_comm = this_comm.replace(/\n/g, "<br>");
document.cookie = dfo + "=" + escape(this_comm) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}







} //Add_com

function countMe(v) {
	if (v.length >150) {alert ("Text too long"); return false;}
}








//function Set_Cookie( name, value, expires, path, domain, secure ) 
function Set_Cookie( name, value, typos)
{
var nvalue = value;

var today = new Date();
today.setTime( today.getTime() );

var expires = "90";

var dsp;
if (!name) {name="sid" ; dsp = "c"}
else if (name=="ga") {dsp = "g"}
else if (name=="fo") {dsp = "f"}
else {dsp = "c"}



function getCookie(NameOfCookie)
{ if (document.cookie.length > 0)
{ begin = document.cookie.indexOf(NameOfCookie+"=");
if (begin != -1)
{ begin += NameOfCookie.length+1;
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end)); }
}
return "";
}





var the_sids = getCookie(name);
if (the_sids.indexOf(nvalue) != -1 ){
	var dzo = dsp + nvalue;
	var dzo_v = getCookie(dzo);
	if (dzo_v.length != 0 ){ // notes
		var answer = confirm ("The notes will be removed too!\n Do you wish to continue anyway?");
		if (answer) {
			expires = "-1";
			var expires_date = new Date( today.getTime() + (expires) );
			document.cookie = dzo + "=" + "" +
			( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
			( ( path ) ? ";path=" + path : "" ) + 
			( ( domain ) ? ";domain=" + domain : "" ) +
			( ( secure ) ? ";secure" : "" );
			the_sids = the_sids.replace(nvalue, "");
			document.getElementById(dzo).innerHTML = "";
			if (typos == 'ima') {document.getElementById(nvalue).innerHTML = listadim;}
			else {document.getElementById(nvalue).innerHTML = "∗<u>Add to My List</u>";}
			//else {document.getElementById(nvalue).innerHTML = "<div class=unstarred> </div>";}
			}
		else {}


	}
	else { // no notes
	if(name=='sid'  && document.getElementById(dzo)){document.getElementById(dzo).innerHTML = "";}
	var spvalue = " " + nvalue;
	the_sids = the_sids.replace(spvalue, "");
	the_sids = the_sids.replace(nvalue, "");
	if (typos == 'ima') {document.getElementById(nvalue).innerHTML = listadim;}
	else {document.getElementById(nvalue).innerHTML = "∗<u>Add to My List</u>";}
	//else {document.getElementById(nvalue).innerHTML = "<div class=unstarred> </div>";}
	}


	}
else {
	var dzo = dsp + nvalue;
	if(name=='sid'){Add_Com(dzo,'','');}
	the_sids = the_sids + " " + nvalue;
	if (typos == 'ima') {document.getElementById(nvalue).innerHTML = listrmim;}
	else{document.getElementById(nvalue).innerHTML = "∗<u>Remove from My List</u>";}
	//else{document.getElementById(nvalue).innerHTML = "<div class=starred> </div>";}
	}

expires = 60;
expires = expires * 1000 * 60 * 60 * 24;
var expires_date = new Date( today.getTime() + (expires) );
document.cookie = name + "=" + the_sids +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );

}// end function Set_Cookie


function PScookie(nv,sp,typos) {
var dsp;
if (!sp) {sp="sid" ; dsp = "c"}
else if (sp=="ga") {dsp = "g"}
else if (sp=="fo") {dsp = "f"}
else {dsp = "c"}

var nvalue = nv;
function getCookie(NameOfCookie) {
	if (document.cookie.length > 0) {
		begin = document.cookie.indexOf(NameOfCookie+"=");
		if (begin != -1)
		{ begin += NameOfCookie.length+1;
		end = document.cookie.indexOf(";", begin);
		if (end == -1) end = document.cookie.length;
		return unescape(document.cookie.substring(begin, end)); }
		}
	return "";
	}

var the_sids = getCookie(sp);
if (the_sids.indexOf(nvalue) == -1 ){
	if (typos == 'ima') {document.getElementById(nvalue).innerHTML = listadim;}
	else {document.getElementById(nvalue).innerHTML = "∗<u>Add to My List</u>";}
	//else {document.getElementById(nvalue).innerHTML = "<div class=unstarred> </div>";}
	}
else {
	var dzo = dsp + nv;
	if (sp == 'sid'){Add_Com(dzo,'','');}
	if (typos == 'ima') {document.getElementById(nvalue).innerHTML = listrmim;}
	else{document.getElementById(nvalue).innerHTML = "∗<u>Remove from My List</u>";}
	//else{document.getElementById(nvalue).innerHTML = "<div class=starred> </div>";}

	}


}


///HTTP Request

   function makeRequest(url, params, typos) {
	var params = params;
	if (!url) {document.getElementById(params).innerHTML = ""; return;}
	var randomnumber=Math.floor(Math.random()*101);
	if (url.indexOf('=')!=-1){url = url + "&noc2=" + randomnumber;}
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
            http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }


      http_request.onreadystatechange = function() { alertContents(params,typos); };
      http_request.open('GET', url, true);
      http_request.send(null);

   }




   function alertContents(par,typ) {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
		if (typ=="img"){
            document.getElementById(par).innerHTML = "<img src=\""+ result+"\" border=0>";}
		else{document.getElementById(par).innerHTML = result;}
         } else {
            alert('There was a problem with the request.\n' + par);
         }
      }
   }


//////////////////////////////////////////////
function cSet( name, value,exp,esc)
{

var today = new Date();
today.setTime( today.getTime() );

if (!exp){var expires = 90 * 1000 * 60 * 60 * 24;}
else if (exp == "s") {var expires = 8000}
else {
	var expires = exp;
	expires = expires * 1000 * 60 * 60 * 24;
	}
var expires_date = new Date( today.getTime() + (expires) );
var esc = esc;
if (esc) {var setvalue=value;}
else {var setvalue = escape(value)}
document.cookie = name + "=" + setvalue +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );

}// end function cSet

//value = encodeURI(value);



function cGet(NameOfCookie)
{ if (document.cookie.length > 0)
{ begin = document.cookie.indexOf(NameOfCookie+"=");
if (begin != -1)
{ begin += NameOfCookie.length+1;
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end)); }
}
return "";
}

// end MYLIST Package




function prefSet(nm,value,exp)
{
var prefs = cGet('pref');
var sprefs = prefs.split( '#' );
if(!sprefs[0]) {sprefs[0] = nm + value;}
else{
	var vrika = 0;
	// VIti-SOts-HMpg101-SPua(no)
	var krit = "/^"+nm+"/";
	krit =eval(krit);
	for ( i = 0; i < sprefs.length; i++ ) {
		if (krit.test(sprefs[i])) {
       			sprefs[i] = nm + value;
			vrika = 1;
			break;
			}
	}

	if (vrika == 0) 
	{
		sprefs[sprefs.length] = nm + value;
	}

}

prefs = sprefs.join("#")


var today = new Date();
today.setTime( today.getTime() );
if (!exp){var expires = "90";}
else {var expires = exp;}
expires = expires * 1000 * 60 * 60 * 24;
var expires_date = new Date( today.getTime() + (expires) );


document.cookie = "pref=" + prefs +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );

}// end function prefSet

















//THE IK2 PACKAGE

var glevel=1;

/////////////DRAG///////////
function Browser() {

  var ua, s, i;

  this.isIE    = false;  // Internet Explorer
  this.isOP    = false;  // Opera
  this.isSA    = false;  // Safari
  this.isNS    = false;  // Netscape
  this.version = null;

  ua = navigator.userAgent;
  s = "Opera";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isOP = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

// Detect Safari for special case positioning fix
  s = "Safari";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isSA = true;
    this.version = parseFloat(ua.substr(i + s.length));
  }


  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as Netscape 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }

  s = "MSIE";
  if ((i = ua.indexOf(s))) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
}

var browser = new Browser();

// Global object to hold drag information.

var dragObj = new Object();

function dragStart(event, id) {

dragObj.zIndex = glevel;
  var el;
  var x, y;

  // If an element id was given, find it. Otherwise use the element being
  // clicked on.

  if (id)
    dragObj.elNode = document.getElementById(id);
  else {
    if (browser.isIE || browser.isOP)
      dragObj.elNode = window.event.srcElement;
    if (browser.isNS)
      dragObj.elNode = event.target;

    // If this is a text node, use its parent element.

    if (dragObj.elNode.nodeType == 3)
      dragObj.elNode = dragObj.elNode.parentNode;
  }

  // Get cursor position with respect to the page.

  if (browser.isIE || browser.isOP) {
    x = window.event.clientX + document.documentElement.scrollLeft
      + document.body.scrollLeft;
    y = window.event.clientY + document.documentElement.scrollTop
      + document.body.scrollTop;
  }
  if (browser.isNS) {
    x = event.clientX + window.scrollX;
    y = event.clientY + window.scrollY;
  }

  // Save starting positions of cursor and element.
  dragObj.cursorStartX = x;
  dragObj.cursorStartY = y;
  dragObj.elStartLeft  = parseInt(dragObj.elNode.style.left, 10);
  dragObj.elStartTop   = parseInt(dragObj.elNode.style.top,  10);

  if (isNaN(dragObj.elStartLeft)) dragObj.elStartLeft = 0;
  if (isNaN(dragObj.elStartTop))  dragObj.elStartTop  = 0;

  // Update element's z-index.
	if (dragObj.elNode.id != "cdivs"){glevel ++;}
  dragObj.elNode.style.zIndex = glevel;

  // Capture mousemove and mouseup events on the page.

  if (browser.isIE || browser.isOP) {
    document.attachEvent("onmousemove", dragGo);
    document.attachEvent("onmouseup",   dragStop);
    window.event.cancelBubble = true;
    window.event.returnValue = false;
  }
  if (browser.isNS) {
    document.addEventListener("mousemove", dragGo,   true);
    document.addEventListener("mouseup",   dragStop, true);
    event.preventDefault();
  }
}

function dragGo(event) {

  var x, y;

  // Get cursor position with respect to the page.

  if (browser.isIE || browser.isOP) {
    x = window.event.clientX + document.documentElement.scrollLeft
      + document.body.scrollLeft;
    y = window.event.clientY + document.documentElement.scrollTop
      + document.body.scrollTop;
  }
  if (browser.isNS) {
    x = event.clientX + window.scrollX;
    y = event.clientY + window.scrollY;
  }
	
  // Move drag element by the same amount the cursor has moved.

  dragObj.elNode.style.left = (dragObj.elStartLeft + x - dragObj.cursorStartX) + "px";
  dragObj.elNode.style.top  = (dragObj.elStartTop  + y - dragObj.cursorStartY) + "px";
 if(dragObj.elNode.id =="info") {
	infotop = dragObj.elNode.style.top;
 	infoleft = dragObj.elNode.style.left;
	}

  if (browser.isIE || browser.isOP) {
    window.event.cancelBubble = true;
    window.event.returnValue = false;
  }
  if (browser.isNS)
    event.preventDefault();
}

function dragStop(event) {

  // Stop capturing mousemove and mouseup events.

  if (browser.isIE || browser.isOP) {
    document.detachEvent("onmousemove", dragGo);
    document.detachEvent("onmouseup",   dragStop);
  }
  if (browser.isNS) {
    document.removeEventListener("mousemove", dragGo,   true);
    document.removeEventListener("mouseup",   dragStop, true);
  }
}


//////////////END DRAG//////////////////







////INTERNAL TABS-WINS/////


var pvinf='';
var pvimg='';
var xxpos = 0;
var yypos = 0;
var tti = null;

var myWidth = 0;
var myHeight = 0;
var scrOfY = 0;
var scrOfX = 0;

function myDimensions () {

  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }


  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
 else {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
}
myDimensions();
window.onresize = myDimensions;



function infowin (v,wi,hi,nm,ty,g,crd,pou) {

  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
 else {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }


	/* pou : pou tha emfanizetai to win
		keke : sto kentro
		mfmke : mouse free sta x kai mouse kentro sto win
		by default einai mfka
	*/

	//if(window!=top){top.location=location.href}

	if (!pou){var pou='mfka'}
	//crd einai gia na mpainei san relative div sto crd
	if (!ty){var ty='fr'} // fr - inn
	if (!nm){var nm='iwin'}
	if (!wi) {var wi= 530}
	if (!hi) {var hi= 350}

	var nwin=0;
	who=document.getElementById(nm);
	bdfade=document.getElementById('bdfade');
	var iifr='ifr'+nm;
	var v=v;
    if(who && who.parentNode){
	if(pvinf==v || !v){
		who.parentNode.removeChild(who);
		nwin=0;
		if(bdfade && bdfade.parentNode){bdfade.parentNode.removeChild(bdfade);
		document.body.style.overflow = 'auto';}
		fitpage=0;

		}
	else {who.parentNode.removeChild(who);nwin=1;}
	}
    //else {nwin=1;}
    else if (v) {nwin=1;}
    if (nwin==1) {
	if (!tti){tti="interkriti";}
	w = myWidth *1;
	h = scrOfY * 1;
	xxpos = w/2-wi/2;
	yypos = h+10;
	mousePos.x = mousePos.x *1;
	mousePos.y = mousePos.y *1;
	dv = document.createElement('div');
	dv.setAttribute('id',nm);
	dv.setAttribute('name',nm);
	//set the inner styling of the div tag
	dv.style.position="absolute";

	//dv.style.width=wi+'px';
	glevel++;
	dv.style.zIndex= glevel;

	if (v.indexOf('preload') != -1) {
		var ryypos = h+(myHeight-hi)/2;
		var rxxpos = (w-wi)/2;
		}

	else if (nm.indexOf('topright') != -1) {
		var ryypos = h+10;
		var rxxpos = 10;
	}
	else if (crd) {
		var ryypos = 0;
		var rxxpos = 0;
	}
	else if (nm.indexOf('kentro') != -1 || pou == 'keke') {
		var ryypos = h+(myHeight-hi-90)/2;
		if (ryypos < h+60) {ryypos = h+60}
		var rxxpos = (w-wi)/2;
	}
	else if (pou == 'mfmke') {
		if (mousePos.x > w - wi-85) {
			rxxpos = mousePos.x - wi - 25;
			if(rxxpos <0){rxxpos = 5};
			}
		else {
			rxxpos= mousePos.x+10;
			}

		ryypos = mousePos.y *1 -(hi)/2;
		
		if (ryypos < h+55 ) {
			ryypos = h  +55;
			}
		if (ryypos > h+myHeight-hi-55 ) {
			ryypos = h+myHeight-hi-55;
			}


		}
//kato or pano apo to mouse
	else if (pou == 'mfmf') {
		if (mousePos.x > w - wi-15) {
			rxxpos = mousePos.x - wi - 25;
			}
		else {
			rxxpos= mousePos.x+10;
			}
		if (mousePos.y > h + myHeight - hi-35) {
			ryypos = h + myHeight - hi -55;
		}
		else {
			ryypos= mousePos.y+10;
			}
	//var ryypos = yypos + Math.floor(Math.random()*20)+30;
	//var rxxpos = xxpos + Math.floor(Math.random()*50)+37;
	}

// opos kentro / keke
	else{
		var ryypos = h+(myHeight-hi-90)/2;
		if (ryypos < h+60) {ryypos = h+60}
		var rxxpos = (w-wi)/2;
	}

	dv.style.top = ryypos +"px";
	dv.style.left = rxxpos + "px";

	var vi = "";	

	//if (nm !='innerimg'){
		vi += "<table cellpadding=0 id=tbu"+nm+" name=tbu"+nm+" cellspacing=0 border=0 class=atopiw>";
	//	}
	//else{
	//	vi += "<table cellpadding=0 id=tbu"+nm+" name=tbu"+nm+" cellspacing=0 border=0 class=fotowin>";
	//	}

	var vit=''
	vit += "<tr><td><div id=tbu"+nm+" name=tbu"+nm+" ";
	if (nm.indexOf("post") == -1){vit += "title=\"Drag to move - Double Click to close\" ondblclick=\"javascript:infowin('','','','"+nm+"','','"+g+"')\"";}
	else  {vit += "title=\"Drag to move\""}
	vit += " onmousedown=\"javascript:dragStart(event,'"+nm+"');\" style=\"cursor:move;padding:6px 0px 6px 3px;text-align:left;\">";
	//vit += "<img src='/lout08/closetab01.gif' border=0 align=right alt=\"Close window\" title=\"Close window\" onclick=\"javascript:infowin('','','','"+nm+"','','"+g+"')\" style=\"cursor:pointer;margin-right:0px;\">";
	vit += "<div class=close title=\"Close window\" onclick=\"javascript:infowin('','','','"+nm+"','','"+g+"')\"> </div>";
	tti = decodeURI(tti);
	tti = unescape(tti);
	vit += "<span id=\"infotitlos"+nm+"\">"+tti+"</span></div></td></tr>";
	innbgcolor ='background:transparent;';
	if (nm !='innerimg'){
		vi += vit;
		var innbgcolor ='background:#ffffff;';
		}
	if (ty == 'fr') {
		vi += "<tr><td><iframe id=ifr"+nm+" name=ifr"+nm+" src=\""+v+"\" frameborder=0 style=\"background-color:#ffffff;margin:0px;border:1px solid #cbdafc;\" width="+wi+" height="+hi+" class=loading></iframe></td></tr>";
		}
	else if (ty == 'inn') {
		var inhi = "height:"+hi+"px;overflow:auto;"
		vi += "<tr><td><div id=intb"+nm+" name=intb"+nm+" class=bar12 style=\"position:relative;color:#000000;font-weight:normal;"+innbgcolor+"margin:0px;width:"+wi+"px;"+inhi+"\">"
		vi += v;
		vi += "</div></td></tr>"
		}
	else if (ty == 'innreq') {
		var inhi = "height:"+hi+"px;overflow:auto;"
		vi += "<tr><td><div id=intb"+nm+" name=intb"+nm+" class=bar12 style=\"position:relative;color:#000000;font-weight:normal;background:#ffffff;margin:0px;width:"+wi+"px;"+inhi+"\">"
		vi += "<table width=100% height=100% class=loading><tr><td><br></td></tr></table>";
		vi += "</div></td></tr>"
		}

	if (nm =='innerimg'){
		vi += vit;
		}

	else {
		vi += "<tr><td><div title=\"Drag to move - Double Click to close\" ";
		if (nm.indexOf("post") ==-1) {vi += "ondblclick=\"javascript:infowin('','','','"+nm+"')\"";}
		vi += " onmousedown=\"javascript:dragStart(event,'"+nm+"');\" ";
		vi += "style=\"font-family:verdana; font-size: 10px;width:100%;cursor:move;text-align:right;font-weight:normal;padding:4px 0px 4px 0px;\">";
		//vi += "<img src='/lout08/closetab02.gif' border=0 align=left alt=\"Close window\" height=12 title=\"Close window\" onclick=\"javascript:infowin('','','','"+nm+"','','"+g+"')\" style=\"cursor:pointer;\">";
		vi += "<div onclick=\"javascript:infowin('','','','"+nm+"','','"+g+"')\" style=\"cursor:pointer;float:left;\">Close</div>";
		vi += "interkriti®</div></td></tr>";
		}

	vi += "</table>";


		

	dv.innerHTML=vi;

	if (crd) {
		dv.style.position="relative";
		document.getElementById(crd).appendChild(dv);
		}
	else {
		document.body.appendChild(dv);
		
		}


	}
tti = null;
pvinf = v;
}


function innerWin (v,wi,hi,nm) {
	if (!nm){var nm='inwin'}
	if (!wi) {var wi= 450}
	else {var wi =wi}
	if (!hi) {var hi= ''}
	else {var hi = hi}
	infowin (v,wi,hi,nm,'inn');

}


function videowin (v,w,h) {
	//var randomnumber=Math.floor(Math.random()*101);
	var vi ='';
	if(!h){h=320}
	if(!w){w=480}
	vi += "/gallery-m/vplayer_iw640.html?mv=";
	vi += v;
	vi += "&mvw="+w + "&mvh="+h ;
	var winw = w*1 + 4;
	var winh = h*1 + 4;
	infowin (vi,winw,winh,'ikvideokentro');

	var tbu ='tbu' + 'ikvideo';
	var titlos ='infotitlos' + 'ikvideo';

}




function videoYTwin (v,w,h) {
	if(!w){w=640}
	if(!h){w=390}
	var vi = "";
	vi += "<object style=\"margin:0px;background:#c1c1c1;\" width=\""+w+"\" height=\""+h+"\"><param name=\"movie\" value=\"http://www.youtube.com/v/";
	vi += v;
	vi += "&hl=en\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/"+v+"&hl=en\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\""+w+"\" height=\""+h+"\"></embed></object>";
	h=h*1+3;
	w=w*1;
	innerWin (vi,w,h,v);
}


function videoYTplist  (v) {
	var vi="/gallery-m/playlists/"+v;
	infowin (vi,'746','413','videolist');
}



function rssWin (v,w,h) {
	if(!w){w=630}
	if(!h){h=430}
	var vi="http://www.interkriti.org/my/reader.php?"+v;
	infowin (vi,w,h,'rsswin');
}



function satWin (v,w,h) {
	if(!w){w=630}
	if(!h){h=430}
	var vi="/maps/gmapsifr.html?"+v;
	infowin (vi,w,h,'satwin');
}

function uniRead (u) {
	var u ="/cgi-bin/lis/uniread.cgi?uni=" + u;
	infowin(u)
}

var fitpage=0;
function openImageInfo(imdescr){
	imdescr = unescape(imdescr);
	var b=document.getElementById('imdescrcont');
	if (!b.innerHTML){b.innerHTML= imdescr; b.style.padding='8px'}
	else{b.innerHTML='';b.style.padding='0px'}
	}
function fotoWin (v,g,imdescr) {

  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }


  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
 else {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
		w = myWidth *1;
		h = scrOfY*1;
		hc = myHeight*1;

if (!document.getElementById('innerimg') || v != pvimg) {

	if(!imdescr){var imdescr='';}
	else {
		var imdescr = imdescr;
		imdescr = unescape(imdescr);
		imdescr = imdescr.replace(/'/g,"\\\'");
		imdescr = imdescr.replace(/"/g,"\\\'");
		imdescr = escape(imdescr);
		}
	vi = "<div ";
	vi += "style=\"background-color:#ffffff;color:#338833;font-family:Arial;font-weight:bold;font-size:12px;text-align:center;padding:0px;width:100%;height:100px;\">";
	vi += "<img src=\""+v+"\" border=0 name=preload id=preload style=\"visibility:visible;width:2px;height:70px;\"><br>Loading...</div>";
	if(imdescr){
	tti += "<div onclick=\"javascript:openImageInfo('"+imdescr+"');\" style=\"float:left;position:relative;margin-right:10px;cursor:pointer;\" class=bve11><img src=\"/lout10/info22.gif\" width=15 align=top>";
	tti += "<div style=\"position:absolute;color:#ffffff;bottom:20px;left:-3px;width:230px;padding:0px;\" class=solblc id=imdescrcont>";
	//tti += imdescr;
	tti += "</div></div>";
	}





	infowin (vi,'400','100','innerimg','inn',g);

	vi = "";
	vi += "<img src=\""+v+"\" border=0 name=winfoinnerimg id=winfoinnerimg style=\"visibility:visible;position:absolute;\" align=top>";
	

	var ininfo ='intb' + 'innerimg';
	document.getElementById(ininfo).style.overflow = "hidden";
	var winfo ='winfo' + 'innerimg';
	var tbu ='tbu' + 'innerimg';
	var titlos ='infotitlos' + 'innerimg';
	var origimhi = '';
	var origimwi = '';
	document.getElementById(tbu).className = 'fotowin';





	function dropLargeImage(){
		document.getElementById(ininfo).innerHTML = vi;
		rw = document.getElementById(winfo).offsetWidth;
		rh = document.getElementById(winfo).offsetHeight;
		document.getElementById(ininfo).title="Double Click to close";
		document.getElementById(ininfo).ondblclick = function(){
			infowin ('','','','innerimg','',g);
			}

		if (g=='g') {
			document.getElementById(tbu).className = 'gfotowin';
			fd = document.createElement('div');
			fd.setAttribute('id','bdfade');
			fd.setAttribute('name','bdfade');
			fd.className = 'fade';
			fd.style.zIndex= glevel;
			glevel++;
			document.getElementById('innerimg').style.zIndex=glevel;
			glevel++;
			document.body.appendChild(fd);

			document.getElementById('bdfade').className='fade';
			document.body.style.overflow = 'hidden'
			document.getElementById('bdfade').style.top =h+'px';
			var totH= h+hc;
			document.getElementById('bdfade').style.height = totH + 'px';
			document.getElementById('bdfade').style.width = '100%';
			document.getElementById('bdfade').onclick = function(){infowin ('','','','innerimg','','g');}
			document.getElementById('bdfade').title = 'Click to go back';
			var clogotop = totH -50;
			var clogo ='<div style=\"float:right;position:absolute;cursor:pointer;top:'+clogotop+'px;right:5px;text-align:center;color:#999999;font-weight:normal;\" class=bar14>Click to go back<br><span class=bve11>&copy;</span> interkriti.org<span class=bve11>&reg;</span>';
			clogo += '</div>';
			document.getElementById('bdfade').innerHTML = clogo;
			
			}



		var reduced = 0;
		var nw =w*.94;
		var nh =  hc*1 - 36;




		if (document.getElementById(winfo).offsetWidth > nw) {
			document.getElementById(ininfo).style.width = nw+'px';
			document.getElementById(ininfo).title = "Click to fit to page - Resume";
			document.getElementById(ininfo).style.cursor = "move";

			document.getElementById(winfo).onmouseover = function(){
				movethepic=1;
				movePic(ininfo)
				}
			document.getElementById(winfo).onmouseout = function(){
				movethepic=0;
				}
				

			document.getElementById(winfo).onclick = function(){
				if (fitpage==0) {
					document.getElementById(winfo).style.width = nw+'px';
					document.getElementById(ininfo).style.height = document.getElementById(winfo).height+'px';
					fitpage=1;
					}
				else{
					document.getElementById(winfo).style.width = rw+'px';
					document.getElementById(ininfo).style.height =  origimhi+'px';
					fitpage=0;
					}
				}
			}
		else {
			nw = document.getElementById(winfo).offsetWidth;
			document.getElementById(ininfo).style.width = nw+'px';
			}

		if (document.getElementById(winfo).offsetHeight > nh) {
			document.getElementById(ininfo).style.height = nh+'px';
			document.getElementById(ininfo).title = "Click to fit to page - Resume";
			document.getElementById(ininfo).style.cursor = "move";
			document.getElementById(winfo).onmouseover = function(){
				movethepic=1;
				movePic(ininfo)
				}
			document.getElementById(winfo).onmouseout = function(){
				movethepic=0;

				}
			document.getElementById(winfo).onclick = function(){
				if (fitpage==0) {
					document.getElementById(winfo).style.height = nh+'px';
					var htrans = rw * nh/rh;
					document.getElementById(winfo).style.width = htrans +'px';
					if (document.getElementById(winfo).offesetWidth > nw) {					
						document.getElementById(winfo).style.width = nw+'px';
						document.getElementById(winfo).style.height = rh * nw/rw+'px';
						document.getElementById(ininfo).style.height = document.getElementById(winfo).offsetHeight+'px';
					}
					document.getElementById(ininfo).style.width = document.getElementById(winfo).offsetWidth+'px';
					fitpage=1;
					}
				else{
					document.getElementById(winfo).style.height = rh+'px';
					document.getElementById(winfo).style.width = rw+'px';
					document.getElementById(ininfo).style.width =  origimwi+'px';
					document.getElementById(ininfo).style.height =  origimhi+'px';
					fitpage=0;
					}
				}
			}
		else {
			nh = document.getElementById(winfo).offsetHeight;
			document.getElementById(ininfo).style.height = nh+'px';
			
			}



		xxpos = (w-nw)/2;
		yypos = h+(hc-nh)/2-10;

		//var ryypos = yypos - Math.floor(Math.random()*20);
		//var rxxpos = xxpos - Math.floor(Math.random()*20);
		document.getElementById('innerimg').style.left = xxpos+'px';
		
		document.getElementById('innerimg').style.top = yypos+'px';
		origimhi = document.getElementById(ininfo).offsetHeight;
		origimwi = document.getElementById(ininfo).offsetWidth;


			}
		document.getElementById('preload').onload = dropLargeImage;
		//if (document.getElementById('preload').offsetHeight >100) {dropLargeImage();}
		//else {document.getElementById('preload').onload = dropLargeImage;}
		//dropLargeImage();
		}
	else {infowin ('','','','innerimg','inn',g);}

	pvimg=v;
	}

var movethepic='';
function movePic(ininfo) {

  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }


  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
 else {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
	if (document.getElementById(ininfo)){
		var hstep = Math.ceil((mousePos.x - myWidth/2)/50)
		var vstep = Math.floor((mousePos.y - (scrOfY+(myHeight/2)))/50)
		document.getElementById(ininfo).scrollLeft += hstep;
		document.getElementById(ininfo).scrollTop += vstep;
	}
	if (document.getElementById(ininfo) && movethepic == 1){setTimeout("movePic('"+ininfo+"');",2);}

}

function movePics(ininfo,hvima) {
	if (hvima == 'h' && movethepic ==2) {		
		hvima = 1;
		document.getElementById(ininfo).scrollLeft += hvima;
		clearTimeout(tim);tim=setTimeout("movePics('"+ininfo+"','h');",2);
		}
	else {
		if (document.getElementById(ininfo)){
			var hstep = Math.ceil((mousePos.x -document.getElementById(ininfo).offsetLeft - document.getElementById(ininfo).clientWidth/2)/100)
			var vstep = Math.ceil((mousePos.y  - document.getElementById(ininfo).offsetTop - document.getElementById(ininfo).clientHeight/2)/100)
			document.getElementById(ininfo).scrollLeft += hstep;
			document.getElementById(ininfo).scrollTop += vstep;

			}
		if (document.getElementById(ininfo) && movethepic == 1){clearTimeout(tim);tim=setTimeout("movePics('"+ininfo+"');",1);}
		}

	}



function showAlerts() {
var dmid = mid.substring(0,2)
var url = '/cp/comusers/'+dmid+'/'+mid+'/alert.txt';
	makeRequest(url, 'alert', 'pg')


}




//Reduce image (constrain)
function imgSize(imgs) {
	if (document.getElementById('preview')) {var maxwidth = 480;}
	else {var maxwidth = 480;}
	if(imgs.width > maxwidth){
		var perc=parseInt(100*maxwidth/imgs.width);
		imgs.width=maxwidth;
		imgs.title+="-image size ~"+perc+"% of original - click to view 100%";
		imgs.alt +="-image size ~"+perc+"% of original - click to view 100%";
		imgs.style.cursor='pointer';

		imgs.onclick = function() {
		fotoWin(imgs.src);
/*
			var ima = imgs.src;
			document.write("<html>\n<head>\n<title>");
			document.write(ima);
			document.write("</title> \n");
			document.write("<style type=\"text/css\">\n<!--\n .menu2  { color:#ffffff;font-family: Tahoma; font-size: 11px; letter-spacing: 0pt; TEXT-DECORATION: none  }\n-->\n");
			document.write("body {	background:rgb(13,68,132) url(\"bg071.gif\");\n");
			//document.write("	background-attachment: fixed;\n");
			//document.write("	background-repeat: repeat-x;\n");
			//document.write("	background-position: 0% 100%; margin:0px;cursor:pointer;\n");
			document.write("	}\n");
			document.write("-->\n");
			document.write("</style>\n");
			document.write("</head>\n");
			document.write("<body onclick=\"javascript:history.back()\" text=ffffff>\n");
			document.write("<table height=100% width=100%><tr><td align=center title=\"Click to resume\"><table cellpadding=2 cellspacing=0 border=0><tr><td bgcolor=ffffff colspan=2><img src=");
			document.write(ima);
			document.write(" border=0 alt=\"Click Image to close\"></td></tr>");
			document.write("<tr><td class=menu2>Original image ");
			document.write("</td><td align=right class=menu2>Click to go back</td></tr></table></td></tr></table>\n");
			document.write("</body>\n</html>");
*/
		}
	}
}


//		OpenWin = window.open(imgs.src, "_blank", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=yes');
//			}



function signMeout () {
	var mid = top.cGet('mid')
	//Store data on server
	var cgi = '/cgi-bin/cp/com/mstor.cgi?sv='+mid;
	infowin(cgi);
}
function clearCookies(){
	var a_all_cookies = document.cookie.split( ';' );
	var a_temp_cookie = '';
	//Remove data from PC
	for ( i = 0; i < a_all_cookies.length; i++ )
	{
		a_temp_cookie = a_all_cookies[i].split( '=' );
		if (a_temp_cookie[1] != mid) {top.cSet( a_temp_cookie[0],a_temp_cookie[1],'-10')}
	}
	//LogOut
	top.cSet( 'mid', mid,'-10');
}


document.onmousemove = mouseMove;
var mousePos='';
function mouseMove(ev){
	ev           = ev || window.event;
	mousePos = mouseCoords(ev);
}

function mouseCoords(ev){
	if(ev.pageX || ev.pageY){
		return {x:ev.pageX, y:ev.pageY};
		}
	else {
		return {x:ev.clientX + document.documentElement.scrollLeft - document.body.clientLeft,y:ev.clientY + document.documentElement.scrollTop  - document.body.clientTop};

		}
	}






var getdirectionsuni='';
function getDirections (t,u,title,cords,clcoords,from,wpos){
	var getdirectionsclose=0;
	var wwi=480;
	var name = 'smapdirections';
	who=document.getElementById('smapdirections');
	if(who && who.parentNode){
		if(getdirectionsuni== u){getdirectionsclose=1; }
		else {who.parentNode.removeChild(who);getdirectionsclose=0; }
		}
	

	if(getdirectionsclose==1){who.parentNode.removeChild(who); }
	else{
		getdirectionsuni= u;
		dv = document.createElement('div');
		dv.setAttribute('id',name);
		dv.setAttribute('name',name);
		//set the inner styling of the div tag
		dv.style.position="absolute";
		var tabborder="1px solid #bfdfbf";
		dv.style.border= tabborder;
		dv.style.borderWidth= '0px 1px 1px 0px';
		dv.style.backgroundColor= '#ffffff';
		//dv.className = 'gmowindv';

		if (mousePos.x > 1*document.body.clientWidth - wwi-5) {
			dv.style.left = mousePos.x - wwi - 5;
			}
		else {
			dv.style.left= mousePos.x+10+'px';
			}
		dv.style.top= mousePos.y-100+'px';

		if(wpos == 'tl'){dv.style.left = '0px';dv.style.top = '0px';}

		dv.style.width=wwi+'px';

		if(wpos == 'tl'){dv.style.width = '100%';dv.style.height = '91%';}

		glevel++;
		dv.style.zIndex= glevel;

		title = unescape(title);
		from = unescape(from);
		estitle = title.replace(/'/g,"\\'");
		esfrom = from.replace(/'/g,"\\'");
		var vi='';

		var mapradius = 50;
		var glats = cords.split( ',' );
		var mwidth = mapradius*2*618/260;

		var mleft= (glats[1] - 23.5141) / (2.8022/617)+11;

		var mtop = (glats[0] - 35.6944)/(0.8916/233) -12;
		if (glats[3] && glats[3].indexOf("p") == 0){var akrivos = ' ';}
		else {var akrivos = '<span style="color:#cc4422;font-weight:bold;"> [approximate] </span>';}
		var gi = '';
		gi += "<div title=\"Click to view detailed map\" onclick=\"javascript:top.tti='"+ estitle+" position on map';top.infowin('/maps/gmapsifr.html?"+cords+"','630','430','satwin','','','','keke')\" style=\"text-align:left;width:220px;height:220px;overflow:hidden;position:relative;cursor:pointer;\" class=gradblu>";

		mtop =mtop * 220 /mwidth;
		mtop = mtop + 110;
		mtop= mtop + "px";

		mleft = mleft * 220 /mwidth;
		mleft = -1 * mleft + 110;
		mleft= mleft + "px";

		mwidth = 640 * 220 /mwidth;
		mwidth = mwidth + "px";

		gi += "<img src=\"/home/mcrete3.gif\" border=0 style=\"position:absolute;left:"+mleft+";top:"+mtop+";width:"+mwidth+";\">";
		gi += "<img src=\"/lout10/magn01_t.png\" border=0 style=\"position:absolute;right:10px;top:10px;\">";
		gi += "<img src=\"/home/trad3_t.png\" border=0 style=\"position:absolute;left:0;top:0;width:220px;\">";
		gi += "</div>";
		var map2radius =2* mapradius;
		gi += "<table class=bve10 width=220 style=\"color:#999999;background:#333333;\"><tr><td align=left><---------/</td><td align=center>"+map2radius+" kms</td><td align=right>/---------></td></tr></table>";


		vi += "<table cellpadding=4 cellspacing=0 border=0 width=100% height=100% class=shpos style=\"line-height:140%;border:1px solid #5b5b5b;background:transparent url(/lout10/closetab01.gif) scroll no-repeat 98% 98%;\"><tr>";
		vi += "<td width=228 valign=top rowspan=2>"+gi+"</td>";

		vi += "<td valign=middle align=center><b><span class=bve11>";

		vi += title;
		vi += "</span></b><br><a href=\"javascript:top.tti='"+ estitle+" position on map';top.infowin('/maps/gmapsifr.html?"+cords+",sat','630','430','satwin','','','','keke')\" style=\"text-decoration:none;\">View "+akrivos+"position on detailed map</a><br><br>";

		vi += "<b>Get directions from:</b><br>";
		vi += "<select class=bar11 onchange=\"javascript:top.tti='Directions to: "+ title+"';myu='/maps/gmapsfromto.html?'+this.value+',"+cords+"';if(this.value){top.infowin(myu,'760','460','satwin','','','','keke')}\">";
		vi += "<option value=\"\">Select</option>";
		vi += "<option value=\"35.3370,25.1737\">Heraklion Airport</option>";

		vi += "<option value=\"35.3418,25.1424\">Heraklion Port</option>";
		vi += "<option value=\"35.3198,25.1404\">Heraklion City</option>";
		vi += "<option value=\"35.5409,24.1400\">Hania Airport</option>";
		vi += "<option value=\"35.4892,24.0638\">Souda Port</option>";
		vi += "<option value=\"35.5138,24.0173\">Hania City</option>";
		vi += "<option value=\"35.3715,24.4759\">Rethymnon Port</option>";
		vi += "<option value=\"35.3660,24.4750\">Rethymnon City</option>";
		vi += "<option value=\"35.1911,25.7176\">Agios Nikolaos City</option>";
		if(title != from){vi += "<option value=\""+clcoords+"\">"+from+"</option>";}


		vi += "</select><br><br><form  style=\"margin:20px 10px 0px 10px;padding:10px;width:180px;border:1px solid #cfcfcf;background:#DAECF9;\" action=\"/crete\" target=\"_top\"><input type=hidden name=more value=spr><input type=hidden name=from value="+u+"><b>What\'s in and around<br></b><input name=trad type=text size=3 maxlength=3 class=bve11 value=50 id="+u+"tradvalue> km radius <input type=submit class=bve11 value=Find></form><br>";
		vi += "</td></tr><tr><td onclick=\"javascript:getDirections('','"+u+"');\"><br></td></tr></table>";
		
		dv.innerHTML=vi;
		document.body.appendChild(dv);

		}

	}



var showmoredirs = new Array();
function showPos (t,u,title,cords,clcoords,wpos){
/*	wpos:
	fho full horizontal
	fve full vertical [default]
*/


	title = unescape(title);
	estitle = title.replace(/'/g,"\\'");
	var vi='';
	var gi='';
	var ti='';
	var di='';

	var mapradius = 50;
	var glats = cords.split( ',' );
	var mwidth = mapradius*2*618/260;

	var mleft= (glats[1] - 23.5141) / (2.8022/617)+11;

	var mtop = (glats[0] - 35.6944)/(0.8916/233) -12;
	if (glats[3] && glats[3].indexOf("p") == 0){var akrivos = ' ';}
	else {var akrivos = '<span style="color:#cc4422;font-weight:bold;"> [approximate] </span>';}
	gi += '<div style="float:left;width:220px;margin:2px 2px 2px 2px;">';
	gi += "<div title=\"Click to view detailed map\" onclick=\"javascript:top.tti='"+ estitle+" position on map';top.infowin('/maps/gmapsifr.html?"+cords+"','630','430','satwin','','','','keke')\" style=\"text-align:left;width:220px;height:220px;overflow:hidden;position:relative;cursor:pointer;\" class=gradblu>";

	mtop =mtop * 220 /mwidth;
	mtop = mtop + 110;
	mtop= mtop + "px";

	mleft = mleft * 220 /mwidth;
	mleft = -1 * mleft + 110;
	mleft= mleft + "px";

	mwidth = 640 * 220 /mwidth;
	mwidth = mwidth + "px";

	gi += "<img src=\"/home/mcrete3.gif\" border=0 style=\"position:absolute;left:"+mleft+";top:"+mtop+";width:"+mwidth+";\">";
	gi += "<img src=\"/lout10/magn01_t.png\" border=0 style=\"position:absolute;right:10px;top:10px;\">";
	gi += "<img src=\"/home/trad3_t.png\" border=0 style=\"position:absolute;left:0;top:0;width:220px;\">";
	gi += "</div>";
	var map2radius =2* mapradius;
	gi += "<table class=bve10 width=220 style=\"color:#bbbbbb;background:#333333;\"><tr><td align=left><---------/</td><td align=center>"+map2radius+" kms</td><td align=right>/---------></td></tr></table>";

	gi += "</div>";

	ti += "<div style=\"float:left;width:220px;margin:2px 2px 2px 2px;text-align:center;\"><b><span class=bve13>";
	ti += title;
	ti += "</span></b><br><a href=\"javascript:top.tti='"+ estitle+" position on map';top.infowin('/maps/gmapsifr.html?"+cords+",sat','630','430','satwin','','','','keke')\" style=\"text-decoration:none;\">View "+akrivos+"position on detailed map</a><br>";
	ti += "<a href=\"/crete/?more=spr&from="+u+"&trad=50\" style=\"text-decoration:none;\"><b>What's In & Around</b><br>(50 Km radius)<br></a>";
	ti += "</div>";

	di += "<div style=\"float:left;width:220px;margin:8px 2px 2px 2px;text-align:center;\">";
	di += "<b>Get directions from:</b><br>";
	di += "<select class=bar12 onchange=\"javascript:top.tti='Directions to: "+ title+"';myu='/maps/gmapsfromto.html?'+this.value+',"+cords+"';if(this.value){top.infowin(myu,'760','460','satwin','','','','keke')}\">";
	di += "<option value=\"\">Select</option>";

	showmoredirs[showmoredirs.length] = new Array ('35.3370,25.1737','Heraklion Airport');
	showmoredirs[showmoredirs.length] = new Array ('35.3418,25.1424','Heraklion Port');
	showmoredirs[showmoredirs.length] = new Array ('35.3198,25.1404','Heraklion City');
	showmoredirs[showmoredirs.length] = new Array ('35.5409,24.1400','Hania Airport');
	showmoredirs[showmoredirs.length] = new Array ('35.4892,24.0638','Souda Port');
	showmoredirs[showmoredirs.length] = new Array ('35.5138,24.0173','Hania City');
	showmoredirs[showmoredirs.length] = new Array ('35.3715,24.4759','Rethymnon Port');
	showmoredirs[showmoredirs.length] = new Array ('35.3660,24.4750','Rethymnon City');
	showmoredirs[showmoredirs.length] = new Array ('35.1911,25.7176','Agios Nikolaos City');
	showmoredirs = showmoredirs.sort(function(a, b){if (a[1]<b[1]) return -1;if (a[1]>b[1]) return 1;return 0;})
	for ( i = 0; i < showmoredirs.length; i++ ) {
		di += "<option value=\""+showmoredirs[i][0]+"\">"+showmoredirs[i][1]+"</option>";
		}

	di += "</select>";




	if (wpos =="fho") {
		vi += "<table cellpadding=0 cellspacing=0 border=0 width=452 class=shpos style=\"border:0px solid #449944;\">";
		vi += "<tr><td align=center valign=top>";
		vi += gi+"<br>"+ti+di;
		}
	else if (wpos =="fvegtd") {
		vi += "<table cellpadding=0 cellspacing=0 border=0 width=224 class=shpos style=\"line-height:140%;border:0px solid #449944;\">";
		vi += "<tr><td align=center valign=top>";
		vi += gi+ti+di;
		}
	else if (wpos =="fvegd") {
		vi += "<table cellpadding=0 cellspacing=0 border=0 width=224 class=shpos style=\"line-height:140%;border:0px solid #449944;\">";
		vi += "<tr><td align=center valign=top>";
		vi += gi+di;
		}
	else if (wpos =="fveg") {
		vi += "<table cellpadding=0 cellspacing=0 border=0 width=224 class=shpos style=\"line-height:140%;border:0px solid #449944;\">";
		vi += "<tr><td align=center valign=top>";
		vi += gi;
		}
	else {
		vi += "<table cellpadding=0 cellspacing=0 border=0 width=224 class=shpos style=\"line-height:140%;border:0px solid #449944;\">";
		vi += "<tr><td align=center valign=top>";
		vi += ti+gi+di;
		}
	vi += "</td></tr></table>";
	document.write(vi);



	}
//END showPos

function showAreaSmall (dvid,area,tx,stogo){
/*
dvid :^aloc > grafei sto shmeio, onoma metaferei to sxhma stohn perioxh tou id=onoma
area : p1d3 klp
tx : an yparxei grafei to keimeno p.x. Kisamos klp

*/
	var vi='';
	var recx;
	var recy;
	var recw;
	var rech;
	var rectx;

	var recid = 'rect' + dvid;
if(stogo) {
	var mapradius = 50;
	var glats = stogo.split( ',' );
	var mwidth = 138/260;
	recx= (glats[1] - 23.5141) / (2.8022/138)-2;
	recy = -((glats[0] - 35.6944)/(0.8916/53))-3;
	recw = 6;rech = 6;
}
else{
	if(area == 'p1d') {
		recx = 0;recy = 0;recw = 40;rech = 56;
		rectex = "Hania Prefecture";
		}
	else if(area == 'p1d1') {
		recx = 0;recy = 0;recw = 18;rech = 26;
		rectex = "Kissamos";
		}
	else if(area == 'p1d2') {
		recx = 8;recy = 22;recw = 16;rech = 16;
		rectex = "Selino";
		}
	else if(area == 'p1d3') {
		recx = 18;recy = 5;recw = 19;rech = 18;
		rectex = "Kydonia";
		}
	else if(area == 'p1d4') {
		recx = 33;recy = 15;recw = 10;rech = 10;
		rectex = "Apokoronas";
		}
	else if(area == 'p1d5') {
		recx = 24;recy = 22;recw = 16;rech = 16;
		rectex = "Sfakia";
		}
	else if(area == 'p1d6') {
		recx = 22;recy = 42;recw = 16;rech = 16;
		rectex = "Gavdos Island";
		}
	else if(area == 'p2d') {
		recx = 41;recy = 10;recw = 30;rech = 30;
		rectex = "Rethymnon Prefecture";
		}
	else if(area == 'p2d1') {
		recx = 41;recy = 13;recw = 16;rech = 15;
		rectex = "Rethymnon";
		}
	else if(area == 'p2d2') {
		recx = 41;recy = 30;recw = 22;rech = 15;
		rectex = "Agios Vassilios";
		}
	else if(area == 'p2d3') {
		recx = 57;recy = 13;recw = 16;rech = 15;
		rectex = "Mylopotamos";
		}
	else if(area == 'p2d4') {
		recx = 52;recy = 25;recw = 12;rech = 10;
		rectex = "Amari";
		}
	else if(area == 'p3d') {
		recx = 62;recy = 11;recw = 41;rech = 42;
		rectex = "Iraklion Prefecture";
		}
	else if(area == 'p3d1') {
		recx = 68;recy = 11;recw = 18;rech = 23;
		rectex = "Malevizi";
		}
	else if(area == 'p3d2') {
		recx = 82;recy = 11;recw = 11;rech = 19;
		rectex = "Temenos (Herakleion City)";
		}
	else if(area == 'p3d3') {
		recx = 90;recy = 13;recw = 17;rech = 24;
		rectex = "Pediada";
		}
	else if(area == 'p3d4') {
		recx = 69;recy = 36;recw = 15;rech = 19;
		rectex = "Kenouriou (Moires)";
		}
	else if(area == 'p3d5') {
		recx = 53;recy = 37;recw = 13;rech = 17;
		rectex = "Pyrgiotissis (Tympaki)";
		}
	else if(area == 'p3d6') {
		recx = 85;recy = 34;recw = 18;rech = 19;
		rectex = "Monofatsi";
		}
	else if(area == 'p3d7') {
		recx = 101;recy = 37;recw = 9;rech = 13;
		rectex = "Viannos";
		}
	else if(area == 'p4d') {
		recx = 106;recy = 11;recw = 40;rech = 45;
		rectex = "Lassithi Prefecture";
		}
	else if(area == 'p4d1') {
		recx = 106;recy = 14;recw = 12;rech = 23;
		rectex = "Meramvello";
		}
	else if(area == 'p4d2') {
		recx = 98;recy = 28;recw = 12;rech = 10;
		rectex = "Oropedio";
		}
	else if(area == 'p4d3') {
		recx = 110;recy = 35;recw = 13;rech = 20;
		rectex = "Ierapetra";
		}
	else if(area == 'p4d4') {
		recx = 118;recy = 16;recw = 29;rech = 35;
		rectex = "Sitia";
		}
	else {
		recx = 0;recy = 0;recw = 0;rech = 0;
		rectex = "Crete";
		}
} //area
	if (dvid.indexOf("aloc") == 0){
		vi += "<div class=areasmall id=\""+dvid+"\"><div class=areasmallrect id=\""+recid+"\"> </div></div>";
		document.write(vi);
		if(tx){document.write(rectex);}
		//document.write(recx +"//"+recy);
		}

	var recstyle =document.getElementById(recid).style;
	recstyle.left = recx +'px';
	recstyle.top = recy +'px';
	recstyle.width = recw +'px';
	recstyle.height = rech +'px';
	recstyle.visibility = 'visible';
	if(stogo){recstyle.borderColor = "#227722";recstyle.borderWidth = "2px";}
	else if(!recw){recstyle.borderColor = "#000000";recstyle.borderWidth = "0px";}
	else{recstyle.borderColor = "#000000";recstyle.borderWidth = "1px";}
	}
//END showAreaSmall







////////Users///////////


function ikUser(uk) {
var ikUfo = cGet('fo');
ikUfo = ikUfo.replace(/  /g," ");
if(ikUfo){
	ikUfo = ikUfo.split(' ');
	ikUfo = ikUfo.length;
	}
else {ikUfo=0;}
var ikUsi = cGet('sid');
ikUsi = ikUsi.replace(/  /g," ");
if(ikUsi){
	ikUsi = ikUsi.split(' ');
	ikUsi = ikUsi.length;
	}
else {ikUsi=0;}
var ikUga = cGet('ga');
ikUga = ikUga.replace(/  /g," ");
if(ikUga){
	ikUga = ikUga.split(' ');
	ikUga = ikUga.length;
	}
else {ikUga=0;}

var who = document.getElementById('ikuser').innerHTML;
var vi='';
 vi += "<table width=200 cellpadding=8 cellspacing=0 border=0 style=\"background:#ffffff;border: solid #5172B7;border-width:0px 1px 1px 1px;\">";

    if(who!='' || uk == 'closemenu'){document.getElementById('ikuser').innerHTML='';
	document.getElementById('menudivs').style.height='0px';
	}
    else if (!mid){
	document.getElementById('menudivs').style.height='960px';
	vi += "<tr><td class=bar12 align=left colspan=2><img src=\"/lout10/closetab01.gif\" border=0 align=right onclick=\"javascript:ikUser('closemenu');\">";
	vi += "My Selected items<hr color=\"#cfcfcf\" size=1>";
	vi += "<a href=\"/crete/?more=MyList\" class=tmm> My Listing ("+ikUsi+")</a>";
	vi += "<a href=\"/crete_image_library/?wdb=my\" class=tmm> My Images ("+ikUga+")</a>";
	//vi += "<a href=\"/mylist/?more=mythreads\" class=tmm> Forum ("+ikUfo+")</a>";
	vi += "</td></tr>";
	vi += "</table>";
	document.getElementById('ikuser').innerHTML=vi;

    }
    else if (mid){
	document.getElementById('menudivs').style.height='960px';
	vi += "<tr><td class=bar12 align=left>";
	vi += "<b>Account : ";
	vi += mid;
	vi += "</b>";
	vi += "</td>";
	vi += "<td class=bve10 align=right>";
	vi += "<img src=\"/lout08/closetab01.gif\" border=0 align=middle onclick=\"javascript:ikUser('closemenu');\"><br>";
	vi += "</td></tr>";
	vi += "<tr><td class=bar12 colspan=2 align=left><hr>";
	//vi += "<a href=\"/home/\" class=tmm> my Home (Full)</a>";
	vi += "<a href=\"/myhome/\" class=tmm> my Home</a>";
	vi += "<a href='#' onclick=\"javascript:tti='My Messages';infowin('/cgi-bin/cp/com/pmessages.cgi','600','430','mymessages');\" class=tmp>My Messages</a>";
	vi += "<a href='#'  onclick=\"javascript:tti='Send Message';infowin('/cp/com/pmsend.html');\" class=tmp>Send Message</a>";
	vi += "<a href='#'  onclick=\"javascript:infowin('/cgi-bin/cp/com/vipr.cgi?un="+mid+"');\" class=tmp>My profile</a>";
	vi += "<a href='#'  onclick=\"javascript:infowin('/cgi-bin/cp/com/imgpan.cgi');\" class=tmp>My Images</a>";
	vi += "<hr>";
	vi += "<a href=\"/cgi-bin/cp/ipg/newgroup.cgi\" class=tmm>Create Group :</a>";
	//vi += "<a href=\"/cgi-bin/cp/ipg/newgroup.cgi?lan=EN\" class=tmm>  in English →</a>";
	//vi += "<a href=\"/cgi-bin/cp/ipg/newgroup.cgi?lan=GR\" class=tmm>» in Greek <li type=square></a>";
	vi += "<a href=\"/cgi-bin/cp/ipg/newpage.cgi\" class=tmm>Create Page</a>";
	vi += "<hr>";
	//vi += "<a href=\"/community/home.html\" class=tmm>» Community Central</a>";
	//vi += "</td></tr>";
	//vi += "<tr><td class=bar12>Set Appearance:";
	//vi += "<a href=\"javascript:document.location.reload()\" onclick=\"javascript:prefSet('EM','01')\" class=tmm>» Classic</a>";
	//vi += "<a href=\"javascript:document.location.reload()\" onclick=\"javascript:prefSet('EM','02')\" class=tmm>» Hello</a>";
	//vi += "</td></tr>";
	//vi += "<tr><td class=bar12>";
	vi += "My List:";
	vi += "<a href=\"/mylist/\" class=tmm> Listing ("+ikUsi+")</a>";
	vi += "<a href=\"/mylist/?more=myimages\" class=tmm> Images ("+ikUga+")</a>";
	vi += "<a href=\"/mylist/?more=mythreads\" class=tmm> Forum ("+ikUfo+")</a>";
	vi += "</td></tr>";
	//vi += "<tr><td  colspan=2 class=bve10 align=right onclick=\"javascript:ikUser('closemenu');\">close";
	//vi += "<img src=\"/lout08/closetab01.gif\" border=0 align=middle><br>";
	//vi += "</td></tr>";
	vi += "</table>";
	document.getElementById('ikuser').innerHTML=vi;


    }

 //document.getElementById('ikuser').onmouseout = function() {ikUser('closemenu')};
}
//////////////////////////// END Users ////////////////////////

////////////////////////////Small Image Gallery ///////////////

var tim;
function chImg(src,div) {
	if (src != document.getElementById(div).src){
		clearTimeout(tim);movethepic=0;
		if(document.getElementById('imainfo')){
			document.getElementById('imainfo').innerHTML = 'Loading...';
			}
		opacity(div, 100, 0, 200);
		cdiv= div.replace(/imd/,'');
		document.getElementById(div).title = tti;
		setTimeout("document.getElementById('"+div+"').src='"+src+"';",200)
		}
	}

function bmainAdj(div) {
	tti = document.getElementById(div).title;
	movethepic=0;
	document.getElementById(div).style.cursor = 'pointer';
	setTimeout("opacity('"+div+"', 0, 100, 200);",200);
	//bmain = 'b'+ div;
	bmain = document.getElementById(div).parentNode.id ;
	var ebmain = 'e'+bmain;
	document.getElementById(ebmain).innerHTML = "";
	document.getElementById(bmain).style.background = '#f3f3f3 url("/lout06/loading.gif") scroll no-repeat 50% 50%';
	document.getElementById(bmain).scrollLeft = 0;
	document.getElementById(bmain).scrollTop = 0;
	document.getElementById(div).style.left = '0px';

	document.getElementById(div).onmouseover=function(){
		movethepic=1; movePics(bmain);
		//document.getElementById('imainfo').style.visibility='visible';
		}
	document.getElementById(div).onmouseout=function(){
		movethepic=0;
		//document.getElementById('imainfo').style.visibility='hidden';
		}
	document.getElementById(div).onclick=function(){
		 tti=tti;fotoWin(this.src,'');
		}

	document.getElementById(div).style.left = '0px';
	document.getElementById(div).style.top = '0px';

	if (document.getElementById(div).height <= document.getElementById(bmain).clientHeight){
		var nwescry = (document.getElementById(bmain).clientHeight - document.getElementById(div).height)/2;
		document.getElementById(div).style.top = nwescry+'px';
		}
	if (document.getElementById(div).width <= document.getElementById(bmain).clientWidth){
		var nwescrx = (document.getElementById(bmain).clientWidth - document.getElementById(div).width)/2;
		document.getElementById(div).style.left = nwescrx+'px';
		}
	else {
		movethepic=2;
		tim = setTimeout("movePics('"+bmain+"','h');",3000);
		}

	if(document.getElementById('imainfo')){
		document.getElementById('imainfo').innerHTML = tti;
		}
	else{
			fd = document.createElement('div');
			fd.setAttribute('id','imainfo');
			fd.setAttribute('name','imainfo');
			fd.className = 'bmain';
			//fd.style.width= document.getElementById(bmain).clientWidth +'px';
			fd.innerHTML = tti;
			//document.getElementById(ebmain).style.width = document.getElementById(bmain).clientWidth +'px';
			//document.getElementById(ebmain).style.position = 'relative';
			//document.getElementById(ebmain).appendChild(fd);
		}

	if (document.getElementById(div).width > document.getElementById(bmain).clientWidth || document.getElementById(div).height > document.getElementById(bmain).clientHeight){
		var magn = "<img src=\"/lout10/move01_t.png\" border=0 style=\"position:absolute;top:-24px;right:2px\">";
		document.getElementById(ebmain).innerHTML += magn;
		document.getElementById(div).style.cursor = 'move';
		}
	}


function opacity(id, opacStart, opacEnd, millisec) { 
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 

    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
} 

//change the opacity for different browsers 
function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
} 

function shiftOpacity(id, millisec) {
    //if an element is invisible, make it visible, else make it ivisible
    if(document.getElementById(id).style.opacity == 0) {
        opacity(id, 0, 100, millisec);
    } else {
        opacity(id, 100, 0, millisec);
    }
} 
//////////////////////////// END Small Image Gallery ///////////////




///////////DIVS AND TABS /////////////////


function showDivCont(d,mk){
	cd = 'c'+d;
	if(mk && document.getElementById(cd).innerHTML == ''){makeRequest(mk,cd)}
	d=document.getElementById(d);
	cd=document.getElementById(cd);

	if(d.className == 'mtabo'){
		cd.style.position = 'absolute';
		cd.style.visibility = 'hidden';
		cd.style.left= '-6000px';
		d.className='mtabc';

		}
	else{
		d.className='mtabo';
		cd.style.position = 'static';
		cd.style.visibility = 'visible';
		cd.style.top= '0px';
		}
	}


function showFulltxt(d,dh){
	var dh = dh * 1;
	var edh = dh+17;
	g=document.getElementById(d);
	if(g.scrollHeight > edh){
		document.getElementById(d).style.height= dh+'px';
		var bs='';
		bs += "<div class=bve10 style=\"background:#fffff0 url(/lout10/velos_k_lb.gif) scroll no-repeat 75% 100%;width:200px;text-align:center;color:#61AFE9;cursor: pointer;padding:0px 0px 0px 0px;margin:0px 0px 0px 0px;float:right;\" onclick=\"javascript:document.getElementById('"+d+"').style.overflow='visible';document.getElementById('"+d+"').style.height='';this.style.visibility='hidden';\" title=\"Expand\">";
		bs += "Expand</div>";
		document.write(bs);
		}
	else{
		document.getElementById(d).style.overflow='visible';

		}
	}
