<!--

var dom = (document.getElementById) ? true : false;
var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ns4 = (document.layers && !dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;

var origWidth, origHeight;
if (ns4) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

if (nodyn) { event = "nope" }
var tipFollowMouse	= true;	
var tipWidth		= 100;
var offX		 	= 12;	// how far from mouse to show tip
var offY		 	= 12; 
var tipFontFamily 	= "Verdana, arial, helvetica, sans-serif";
var tipFontSize		= "9pt";
var tipFontColor		= "#000000";
var tipBgColor		= "#DDECFF"; 
var origBgColor 		= tipBgColor; // in case no bgColor set in array
var tipBorderColor 	= "#000080";
var tipBorderWidth 	= 1;
var tipBorderStyle 	= "ridge";
var tipPadding	 	= 0;

var messages = new Array();
messages[0] = new Array('','',"#FFFFFF");
messages[1] = new Array('http://planmagic.com/images/plmmar.jpg','Professional marketing planning software.',"#DDECFF");
messages[2] = new Array('http://planmagic.com/images/plmfinance.jpg','Financial calculations and projections made easy.',"#E9E9E9");

if (document.images) {
	var theImgs = new Array();
	for (var i=0; i<messages.length; i++) {
  	theImgs[i] = new Image();
		theImgs[i].src = messages[i][0];
  }
}

var startStr = '<table width="' + tipWidth + '"><tr><td align="center" width="100%"><img src="';
var midStr = '" border="0"></td></tr><tr><td valign="top">';
var endStr = '</td></tr></table>';

var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ns4)? document.tipDiv.document: (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = (ns4) ? document.tipDiv: tooltip.style;
	if (ie4||ie5||ns5) {	// ns4 would lose all this on rewrites
		tipcss.width = tipWidth+"px";
		tipcss.fontFamily = tipFontFamily;
		tipcss.fontSize = tipFontSize;
		tipcss.color = tipFontColor;
		tipcss.backgroundColor = tipBgColor;
		tipcss.borderColor = tipBorderColor;
		tipcss.borderWidth = tipBorderWidth + "px";
		tipcss.padding = tipPadding + "px";
		tipcss.borderStyle = tipBorderStyle;
	}
	if (tooltip&&tipFollowMouse) {
		if (ns4) document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove = trackMouse;
	}
}

window.onload = initTip;

var t1,t2;	// for setTimeouts
var tipOn = false;	// check if over tooltip link
function doTooltip(evt,num,txt) {

	if (!tooltip) return;
	if (t1) clearTimeout(t1);	if (t2) clearTimeout(t2);
	tipOn = true;
	// set colors if included in messages array
	if (messages[num][2])	var curBgColor = messages[num][2];
	else curBgColor = tipBgColor;
	if (messages[num][3])	var curFontColor = messages[num][3];
	else curFontColor = tipFontColor;
	if (ns4) {
		var tip = '<table bgcolor="' + tipBorderColor + '" width="' + tipWidth + '" cellspacing="0" cellpadding="' + tipBorderWidth + '" border="0"><tr><td><table bgcolor="' + curBgColor + '" width="100%" cellspacing="0" cellpadding="' + tipPadding + '" border="0"><tr><td>'+ startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr + '</td></tr></table></td></tr></table>';
		tooltip.write(tip);
		tooltip.close();
	} else if (ie4||ie5||ns5) {
		var tip = '<table bgcolor="#ffffff" cellspacing="0" cellpadding="0" border="0"><tr><td><p style=" font-family:verdana;font-size:10px; margin:3px 3px 3px 3px;">' + txt +'</p></td></tr></table>'
		
		tipcss.backgroundColor = curBgColor;
	 	tooltip.innerHTML = tip;
	}
	if (!tipFollowMouse) positionTip(evt);
	else t1=setTimeout("tipcss.visibility='visible'",100);
}

var mouseX, mouseY;
function trackMouse(evt) {
	mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
	mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	if (tipOn) positionTip(evt);
}

function positionTip(evt) {
	if (!tipFollowMouse) {
		mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
		mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ns4)? tooltip.width: (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ns4)? tooltip.height: (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns4||ns5)? window.innerWidth-20+window.pageXOffset: document.body.clientWidth+document.body.scrollLeft;
	var winHt = (ns4||ns5)? window.innerHeight-20+window.pageYOffset: document.body.clientHeight+document.body.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
	if ((mouseX+offX+tpWd)>winWd) 
		tipcss.left = (ns4)? mouseX-(tpWd+offX): mouseX-(tpWd+offX)+"px";
	else tipcss.left = (ns4)? mouseX+offX: mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt) 
		tipcss.top = (ns4)? winHt-(tpHt+offY): winHt-(tpHt+offY)+"px";
	else tipcss.top = (ns4)? mouseY+offY: mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}


function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; 
  if(d.images) 
  { if(!d.MM_p) 
  	d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  focus();
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_findObj_a(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}


function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) {
  v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_showHideLayers_a() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) {   
  	v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
     if ((args[0] == "featurecloser" || args[0] == "artistcloser") && !document.all) obj.top=tempY;
	obj.visibility=v; }
}

function MM_showHideLayersArtist() { //v3.0
  var i,p,v,obj,args=MM_showHideLayersArtist.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { 
	v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
	if (args[0] == "artistcloser" && !document.all) obj.top=tempY;
	obj.visibility=v; }		
}

function MM_showHideLayersFeature() { //v3.0
  var Y,i,p,v,obj,args=MM_showHideLayersFeature.arguments;
 	
   for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
	 if (args[0] == "featurecloser" && !document.all) obj.top=tempY;
	obj.visibility=v;}  
 }


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openMediaWnd(strLocation) {
	window.open(strLocation,"newmedia","width=700,height=600,toolbar=no,status=no,menubar=0,scrollbars=yes,resizable=1");
}	

function openEnlargedImageWnd(strLocation) {
	window.open(strLocation,"new","width=500,height=350,toolbar=no,status=no,menubar=0,scrollbars=no,resizable=1");
}	

function OpenWndForSignIn(sLocation,sQueryString) 
{	
var sUrl;
var sQueryStringEscaped;

if ( sQueryString != "" && sQueryString != null )
{
	sQueryStringEscaped = escape(sQueryString);
	sUrl = sLocation+"?"+"RedirectURL="+sQueryStringEscaped;
}
else 
{
	sUrl = sLocation;
}
window.open(sUrl,"new","width=490,height=310,toolbar=no,status=no,menubar=0,scrollbars=yes,resizable=1");
}

//Synartisi gia to Enter Keywords -->

function MM_changeProp(objName,x,theProp,theValue) { 
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}


document.write('<link rel="stylesheet" href="Styles/');

var arVersion = navigator.appVersion.split("MSIE");
var version = parseFloat(arVersion[1]);

var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf('gecko') != -1) document.write('ie6.css');
else if ((agt.indexOf('msie') != -1) && (version<7)) document.write('ie6.css');
else if ((agt.indexOf('msie') != -1) && (version=7)) document.write('ie6.css');
else document.write('ie6.css');
document.write('" type="text/css">');


function toggleDiv(id,flagit) {
if (flagit=="1"){
if (document.layers) document.layers[''+id+''].visibility = "show"
else if (document.all) document.all[''+id+''].style.visibility = "visible"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
}
else
if (flagit=="0"){
if (document.layers) document.layers[''+id+''].visibility = "hide"
else if (document.all) document.all[''+id+''].style.visibility = "hidden"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
}
}

function bcolor(bcol,d_name)
{
if (document.all)
{
 var thestyle= eval ('document.all.'+d_name+'.style');
 thestyle.backgroundColor=bcol;
 }
}

//Synartisi gia ta ergastiria pou me klik emfanizontai kai e3afanizontai ta tables
var userAgent = navigator.userAgent.toLowerCase();
var is_opera  = (userAgent.indexOf('opera') != -1);
var is_saf    = ((userAgent.indexOf('applewebkit') != -1) || (navigator.vendor == 'Apple Computer, Inc.'));
var is_webtv  = (userAgent.indexOf('webtv') != -1);
var is_ie     = ((userAgent.indexOf('msie') != -1) && (!is_opera) && (!is_saf) && (!is_webtv));
var is_ie4    = ((is_ie) && (userAgent.indexOf('msie 4.') != -1));
var is_moz    = ((navigator.product == 'Gecko') && (!is_saf));
var is_kon    = (userAgent.indexOf('konqueror') != -1);
var is_ns     = ((userAgent.indexOf('compatible') == -1) && (userAgent.indexOf('mozilla') != -1) && (!is_opera) && (!is_webtv) && (!is_saf));
var is_ns4    = ((is_ns) && (parseInt(navigator.appVersion) == 4));
var is_mac    = (userAgent.indexOf('mac') != -1);

// Catch possible bugs with WebTV and other older browsers
var is_regexp = (window.RegExp) ? true : false;

String.prototype.vBlength = function()
{
	return (is_ie && this.indexOf('\n') != -1) ? this.replace(/\r?\n/g, '_').length : this.length;
}

function fetch_object(idname)
{
	if (document.getElementById)
	{
		return document.getElementById(idname);
	}
	else if (document.all)
	{
		return document.all[idname];
	}
	else if (document.layers)
	{
		return document.layers[idname];
	}
	else
	{
		return null;
	}
}

function toggle_collapse(objiid)
{
	var cel = fetch_object('collapseobj_' + objiid);
	//img = fetch_object('collapseimg_' + objid);
	//cel = fetch_object('collapsecel_' + objid);

	if (!cel)
	{
		// nothing to collapse!
		return false;
	}

	if (cel.style.display == 'none')
	{
		cel.style.display = '';
	}
	else
	{
		cel.style.display = 'none';
	}
	return false;
}

//-->

// Συναρτήσεις Εμφάνισης Scrolling Message
<!-- 
                                     
orientation = "horizontal"        
scrollerWidth = "560px"             
scrollerHeight = "20px"             
borderWidth = 0                   
borderColour = "#ffffff"        
backColour = "#fff7ed"             
staticColour = "#888888"          
stopScroll = 0                   
textAlignment="left"        
                          
linkFont = "verdana"               
linkWeight = "normal"            
linkColour = "#666666"            
linkSize = "10"                   
linkDecoration = "none" 

slinkFont = "verdana"              
slinkWeight = "normal"           
slinkColour = "orange"           
slinkSize = "10"                  
slinkDecoration = "underline"

scrollerDivider = "&nbsp;-&nbsp;"  
                                  
ns4Text = "___";  
ns4URL = "---";           
ns4Target = "_top";  


var isIE = (document.getElementById && document.all)?true:false;
var isNS4 = (document.layers)?true:false;
var isNS6 = (document.getElementById && !document.all)?true:false;

style='<style type="text/css">';
style+='p.scp{font-family:'+linkFont+'; color:'+staticColour+'; font-size:11px;margin:0px 0px 0px 0px; text-align:'+textAlignment+'}';
style+='a.rcScroller,a.rcScroller:active,a.rcScroller:visited{color:'+linkColour+';text-decoration:'+linkDecoration+'; font-weight:'+linkWeight+'}';
style+='a.rcScroller:hover{color:'+slinkColour+';text-decoration:'+slinkDecoration+'; font-weight:'+slinkWeight+'}';
style+='rcScrollerHoverNS{color:red;text-decoration:'+slinkDecoration+'; font-weight:'+slinkWeight+'}';
style+='<\/style>';
document.writeln(style);

function buildScroller()
{
  if(isNS4){
    scroller='<table border="0" cellpadding="0" cellspacing="0" width="'+scrollerWidth+'" bgcolor="'+borderColour+'"><tr><td>'
    scroller+='<table border="0" cellpadding="3" cellspacing="1" width="100%" height="20" bgcolor="'+backColour+'"><tr><td align="center" nowrap><p class="scp">';
    if(ns4URL.toLowerCase()!="none"){scroller+='<a href="'+ns4URL+'" class="rcScroller" target="'+ns4Target+'">'+ns4Text+'</a>';}
    else{scroller+=ns4Text;} 
    scroller+='</p></td></tr></table></td></tr></table>'   
  }else{
    scroller='<table border="0" cellpadding="0" cellspacing="0" style="margin-right:10px;width:'+scrollerWidth+';height:'+scrollerHeight+';border:'+borderWidth+'px solid '+borderColour+';background-color:'+backColour+'">';
    scroller+='<tr valign="middle"><td><div id="div" style="';
	
    if(orientation.toLowerCase()=="vertical"){scroller+='height:'+scrollerHeight+';';}
	
    scroller+='width:'+scrollerWidth+'; position:relative; background-color:'+backColour+'; overflow:hidden">';
    scroller+='<div id="div1" style="position:relative; left:0; z-index:1">';
    scroller+='<table border="0" name="table" id="table"';
    if(orientation.toLowerCase()=="vertical"){scroller+='style="width:'+scrollerWidth+'"';}
    scroller+='><tr>';
    y=0;
    while (y<4)
    {
      for (x=0; x<(Article.length); x++)
      {
        if(orientation.toLowerCase()=="vertical"){scroller+='<tr>';}
        scroller+='<td ';
        if(orientation.toLowerCase()=="horizontal"){scroller+='nowrap';} if(stopScroll==1){scroller+=' onMouseOver="stopScroller();" onMouseOut="setWidth()"';}
        scroller+='><p class="scp">';
        if(Article[x][1].toLowerCase()!="none"){scroller+='<a class="rcScroller" href="'+Article[x][1]+'" >'+Article[x][0]+'<\/a>';
        }else{scroller+=Article[x][0];}          
        scroller+='</p><\/td>';
        
        if(orientation.toLowerCase()=="vertical"){scroller+='<\/tr>';}
              
        if(scrollerDivider.toLowerCase() != "none"){scroller+='<td nowrap><p class="scp">'+scrollerDivider+'<\/p><\/td>';}
      }
      y++
    }
    scroller+='<\/tr><\/table><\/div><\/div><\/td><\/tr><\/table>';  
  }
  document.writeln(scroller);
}
function setWidth()
{ 
  tableObj=(isIE)?document.all("table"):document.getElementById("table"); 
  obj=(isIE)?document.all.div1:document.getElementById("div1");   
  objWidth=(orientation.toLowerCase()=="horizontal")?getOffset(tableObj,"width"):getOffset(tableObj,"height");
  HalfWidth=Math.floor(objWidth/2);
  newWidth = (HalfWidth*2)+2;
  obj.style.width=newWidth
  moveLayer(obj, newWidth);
}

function moveLayer(obj, width)
{
  
  maxLeft = (0-(width/2)+2)/2
  if(orientation.toLowerCase()=="horizontal"){
    obj.style.left=(parseInt(obj.style.left) <= maxLeft)?0:parseInt(obj.style.left) - 1
  }else{
    if(obj.style.top==""){obj.style.top=0;}
   // alert(obj.style.top)
    if (parseInt(obj.style.top)<(0-(width/2)+6)){
      obj.style.top = 0
    }else{
      obj.style.top = parseInt(obj.style.top)-1
    }
  }
  timer = setTimeout ("moveLayer(obj, "+width+");",25); 
}

function getOffset(obj, dim) 
{
  if(dim=="width")
  {
    oWidth = obj.offsetWidth
    return oWidth
  }  
  else if(dim=="height")
  {
    oHeight = obj.offsetHeight
    return oHeight
  }    
}

function stopScroller()
{
  clearTimeout(timer)  
}

function runScroller(){
  if(!isNS4){setWidth()}
}
//-->


function Search(){
	if(document.getElementById("SearchDiv").style.visibility == "visible"){
		document.getElementById("SearchDiv").style.visibility = "hidden";
	}
	else{
		document.getElementById("SearchDiv").style.visibility = "visible";
	}
}


function calcTamta(){
	var budg = document.getElementById("budg").value;
	var pro = document.getElementById("pro").value;
	var months = document.getElementById("months").value;

	var int = (parseFloat(document.getElementById("int").value) / 100 ) / 12;
	
	var result = (budg - pro) * (  int * Math.pow(( 1 + int),months) / ( Math.pow((1+int),months) - 1  )  )
	if(result < 300){
		document.getElementById("tranche").value = "Not Valid"
	}
	else{
		document.getElementById("tranche").value = result.toFixed(2);
		document.getElementById("tot_b").value   = (result * months).toFixed(2);
		document.getElementById("tot_i").value   = ((result * months) - budg).toFixed(2);
	}
}

function Money(fld) {
    fld -= 0;
    fld = (Math.round(fld*100))/100;
    return (fld == Math.floor(fld)) ? fld + '.00' 
              : ( (fld*10 == Math.floor(fld*10)) ? 
                       fld + '0' : fld);
}

function Calc_21(building,content,zoneAb,zoneAc,zoneBb,zoneBc,zoneGb,zoneGc,zoneDb,zoneDc,max_total,max_building,max_content,min_ins,tot_disc,security,disc_build,disc_cont,disc_over,cYearLimit,cYearSplit,ID,insName)	
{
	var building_value	= document.getElementById("v_b").value / 1000;
	var content_value	= document.getElementById("v_c").value / 1000;
	
	document.getElementById("error").value = "" // error κενό
	
	var Sc = content * content_value;
	var Sb = building * building_value;
	var Sum = 	 0
	var Sum_E =  0
	var Ec = 	 0
	var Eb = 	 0
	var TotalM = 0
	
	// Δρομολόγηση Σεισμικών Ζωνών ανα εταιρία
	
	var Zones = document.getElementById("v_e").value;
	var zArray = Zones.split(";")
	var currentZone = 0
	
	if(insName == "omega"){
		currentZone = zArray[0]
	}
	
	if(insName == "interlife"){
		currentZone = zArray[1]
	}

	if(insName == "interasco"){
		currentZone = zArray[2]
	}

	if(insName == "pisti"){
		currentZone = zArray[3]
	}
		
	if(insName == "ethniki"){
		currentZone = zArray[4]
	}
		
	if(insName == "allianz"){
		currentZone = zArray[5]
	}

	// Τέλος Δρομολόγησης - ζώνη στην μεταβλητή currentZone
	
	if(currentZone == 1)	//	ζώνη σεισμού A
	{	
		Ec = zoneAc * content_value;
		Eb = zoneAb * building_value;
	}	
	if(currentZone == 2)	//	ζώνη σεισμού B
	{
		Ec = zoneBc * content_value;
		Eb = zoneBb * building_value;
	}
	if(currentZone == 3)	//	ζώνη σεισμού Γ
	{
		Ec = zoneGc * content_value;
		Eb = zoneGb * building_value;
	}
	if(currentZone == 4)	//	ζώνη σεισμού Δ
	{
		Ec = zoneDc * content_value;
		Eb = zoneDb * building_value;
	}
	
	// υπολογισμός σεισμού βάση έτος κατασκευής
	// ενεργοποιήση φίλτρου πρέπει zoneDb & zoneDc 8.88 FIX Value
	
	if(zoneDb == "split")
	{
		if(cYearSplit != "0000")
		{
			if(document.getElementById("v_y").value <= cYearSplit)
			{
				Ec = zoneAc * content_value;
				Eb = zoneAb * building_value;
			}
			else
			{
				Ec = zoneBc * content_value;
				Eb = zoneBb * building_value;
			}
		}
		else
		{
				Ec = zoneAc * content_value;
				Eb = zoneAb * building_value;
		}		
	}
	
	// υπολογισμός σεισμού βάση έτος κατασκευής
	// ενεργοποιήση φίλτρο Interlife

	if(zoneDb == "interlife"){
		if(document.getElementById("v_y").value <= 1975 ){
				if(currentZone == 1)	//	ζώνη σεισμού A
				{
					Ec = 2.00 * content_value;
					Eb = 2.00 * building_value;		
				}
				if(currentZone == 2)	//	ζώνη σεισμού B
				{
					Ec = 2.10 * content_value;
					Eb = 2.10 * building_value;					
				}
				if(currentZone == 3)	//	ζώνη σεισμού Γ
				{
					Ec = 2.20 * content_value;
					Eb = 2.20 * building_value;
				}
		}
		
		if( (document.getElementById("v_y").value <= 1983 ) && (document.getElementById("v_y").value >= 1976 ) ){

				if(currentZone == 1)	//	ζώνη σεισμού A
				{
					Ec = 1.80 * content_value;
					Eb = 1.80 * building_value;		
				}
				if(currentZone == 2)	//	ζώνη σεισμού B
				{
					Ec = 1.89 * content_value;
					Eb = 1.89 * building_value;					
				}
				if(currentZone == 3)	//	ζώνη σεισμού Γ
				{
					Ec = 1.98 * content_value;
					Eb = 1.98 * building_value;
				}
		}
		if( (document.getElementById("v_y").value <= 1989 ) && (document.getElementById("v_y").value >= 1984 ) ){

				if(currentZone == 1)	//	ζώνη σεισμού A
				{
					Ec = 1.60 * content_value;
					Eb = 1.60 * building_value;		
				}
				if(currentZone == 2)	//	ζώνη σεισμού B
				{
					Ec = 1.68 * content_value;
					Eb = 1.68 * building_value;					
				}
				if(currentZone == 3)//	ζώνη σεισμού Γ
				{
					Ec = 1.76 * content_value;
					Eb = 1.76 * building_value;
				}
		}
		if( (document.getElementById("v_y").value <= 1999 ) && (document.getElementById("v_y").value >= 1990 ) ){

				if(currentZone == 1)	//	ζώνη σεισμού A
				{
					Ec = 1.40 * content_value;
					Eb = 1.40 * building_value;		
				}
				if(currentZone == 2)	//	ζώνη σεισμού B
				{
					Ec = 1.47 * content_value;
					Eb = 1.47 * building_value;					
				}
				if(currentZone == 3)	//	ζώνη σεισμού Γ
				{
					Ec = 1.54 * content_value;
					Eb = 1.54 * building_value;
				}
		}
		if( (document.getElementById("v_y").value < 2010) && (document.getElementById("v_y").value > 1999) ){

				if(currentZone == 1)	//	ζώνη σεισμού A
				{
					Ec = 1.20 * content_value;
					Eb = 1.20 * building_value;		
				}
				if(currentZone == 2)	//	ζώνη σεισμού B
				{
					Ec = 1.26 * content_value;
					Eb = 1.26 * building_value;					
				}
				if(currentZone == 3)	//	ζώνη σεισμού Γ
				{
					Ec = 1.32 * content_value;
					Eb = 1.32 * building_value;
				}
		}
	}

	// ------------------------------------
	
	if(document.getElementById("v_c_ch").checked == false){	//	αν δεν είναι τσεκαρισμένο το περιεχόμενο ξανά 0
		Ec = 0;
	}
	if(document.getElementById("v_b_ch").checked == false){	//	αν δεν είναι τσεκαρισμένη η οικοδομή ξανά 0
		Eb = 0;
	}
	Sum_E = Ec + Eb;
	
	var TheDate = new Date();
	
	if( (document.getElementById("v_y").value < cYearLimit) || (document.getElementById("v_y").value < 1950)  ){	//	αν έτος κατασκεύης πρίν το όριο
		Sum_E = 0;
		document.getElementById("error").value = "age of building plus " + cYearLimit	//	εκτύπωση error
	}
	
	if(document.getElementById("v_t").value < 0){	//	αν _
		document.getElementById("error").value = "sq. meters > 0"	//	εκτύπωση error
	}	
	
	if(document.getElementById("v_c").value < 0){	//	αν _
		document.getElementById("error").value = " budget > 0"	//	εκτύπωση error
	}	
	
	if(document.getElementById("v_b").value < 0){	//	αν _
		document.getElementById("error").value = " budget > 0"	//	εκτύπωση error
	}	
	// εκπτώσεις 
	var discount = 0;
	
	Sum = Sc + Sb;
	
	//if(document.getElementById("v_a").checked == true){ 	// έκπτωση {security} για συναγερμό
	//	discount = discount + Sc * security;
	//}
	
	if((parseFloat(building_value) + parseFloat(content_value)) > (disc_over / 1000)){	// έκπτωση {disc_xxx} για κεφάλαια άνω των {disc_over}
		discount = discount + Sc * disc_cont + Sb * disc_build; 
	}
	
	Sum = Sum - discount;
	
	TotalM = Sum_E + Sum;
	
	// Φίλτρο Interasco Ελάχιστου Τιμολόγιου
	
	if(min_ins != "interasco"){
		if(TotalM < min_ins && TotalM > 0)	// όχι κάτω απο {min_ins}
		{
			TotalM = min_ins;
		}
	}
	else
	{
		if((document.getElementById("v_b").value / document.getElementById("v_t").value ) > 750){
			TotalM = 0.00;
			document.getElementById("error").value = " minimum square 750 m^2";
		}
		if((document.getElementById("v_c").value / document.getElementById("v_t").value ) > 300){
			TotalM = 0.00;
			document.getElementById("error").value = " minimum content 300 m^2";	
		}
	}

	if(building_value > ( max_building / 1000 ) ){	//  στο building_value
		TotalM	= 0.00;
		document.getElementById("error").value = " building budget: limit " + max_building;
	}
	
	if(content_value > ( max_content / 1000 ) ){	//  στο content_value
		TotalM	= 0.00;
		document.getElementById("error").value = " content budget: limit " + max_content;
	}

	if( (content_value+building_value) > (max_total/1000) ){
		TotalM	= 0.00;
		document.getElementById("error").value = " total budget: limit " + max_total;
	}
	
	if(document.getElementById("error").value ==""){
  		document.getElementById("Res" + ID ).value = Money(TotalM);
	}
	else{
		document.getElementById("Res" + ID).value = 'NuN';
	}
}

