/* author: JJD www.KANDAKI.com */
/* Creation date: 20/12/2002   */
/* Last Modified: 27/10/2007   */


function xiti(_page){
hsh = new Date();
hsd = document;
hsr = hsd.referrer.replace(/[<>]/g, '');
hsi='<a href="http://www.xiti.com/xiti.asp?s=148792" TARGET="_blank">'
hsi += '<img width="39" height="25" border=0 ';
hsi += 'src="http://logv24.xiti.com/hit.xiti?s=148792';
hsi += '&p='+_page;
hsi += '&hl=' + hsh.getHours() + 'x' + hsh.getMinutes() + 'x' + hsh.getSeconds();
if(parseFloat(navigator.appVersion)>=4)
{Xiti_s=screen;hsi += '&r=' + Xiti_s.width + 'x' + Xiti_s.height + 'x' + Xiti_s.pixelDepth + 'x' + Xiti_s.colorDepth;}
hsd.writeln(hsi + '&ref=' + hsr.replace(/&/g, '$') + '" title="Mesurez votre audience"></a>');
}

function ecris_lui_Btn(usr,dom,tld){
		var ady = usr + "@" + dom + "." + tld;
  		document.write("<A HREF=\"" + "mai" + "lto:" + ady + "\">e-mail</A>" );
}

function ecris_moi_Btn(){
		var usr = "contact";  
		var dom = "kandaki";  
		var tld = "com";  
		var ady = usr + "@" + dom + "." + tld;
  		document.write("<a href=\"" + "mai" + "lto:" + ady + "\">" );
}
function ecris_moi_Btn2(){
		var usr = "contact";  
		var dom = "kandaki";  
		var tld = "com";  
		var ady = usr + "@" + dom + "." + tld;
  		document.write("<a  class=info href=\"" + "mai" + "lto:" + ady + "\">" );
}

function book_marque(BookmarkURL,BookmarkTitle){
      if (document.all) // If the browser is Internet Explorer
      { window.external.AddFavorite(BookmarkURL,BookmarkTitle)
      }
      else //If the browser is Mozilla Firefox
      {              window.sidebar.addPanel(BookmarkTitle, BookmarkURL, '');
      }
}



function showIt(jjd) {
 var dx = document.getElementById(jjd);
 dx.style.display='block';
}

function hideIt(jjd) {
 var dx = document.getElementById(jjd);
 dx.style.display='none';
}

function showDiv(name)
                {          // avant 1er appel de la fct il faut bien sur :   var anc_div = 'xxxx';
                      // document.getElementById(anc_onglet).style.display = 'none';
                      //  document.getElementById(name).style.display = 'block';
                       hideIt(anc_div);
                       showIt(name);
                       anc_div = name;
                }



function transferview(image,width,height) {

if (width > 1000) {height=Math.round(height*1000/width);  width=1000;  };
if (height > 700) {width=Math.round(width*700/height);  height=700;  };

var s1a="<HEAD><meta http-equiv='imagetoolbar' content='no'> "
var s1b="<script language='JavaScript'> t = null;";
var s1c="function closeMe(tps){t = setTimeout('self.close()',tps);} ";
var s1k="function fermeMoi(){t = null; self.close();} ";


var s1f="function zoomThisItem(percent) {document.getElementById('x').style.width=" + width + "*(percent/100); document.getElementById('x').style.height=" + height + "*(percent/100);} ";
var s1d="</script></HEAD>";


var s1e="<BODY onload='javascript:closeMe(10000);' onBlur='javascript:self.focus();' onunload='javascript:self.close();' >";
var cond1="width="+(width+20)+"";
var cond2="height="+(height+70)+"";
var s2a ="<TITLE>www.kandaki.com Image Viewer</TITLE>";

var s2b ="<div style='	overflow:auto;position:relative;width:" + width + ";height:" + height + "' align='center'>";
var s2c ="<IMG SRC='"+image+"' width='"+width+"' height='"+height+"' BORDER=0 galleryimg='no' id='x' mame='x'></div>"

var s3a="<CENTER><FORM><INPUT TYPE='BUTTON' VALUE='Close Window'"+ " onClick='fermeMoi();'> "
var s3b="      <INPUT TYPE='BUTTON' VALUE='150%'"+ " onClick='zoomThisItem(150)'> ";
var s3c="      <INPUT TYPE='BUTTON' VALUE='100%'"+ " onClick='zoomThisItem(100)'> ";
var s9="</FORM></CENTER></BODY>"

ImageWindow=window.open("", "newwin"+width,"toolbar=no,scrollbars=no,menubar=no,"+cond1+","+cond2);
ImageWindow.document.write(s1a+s1b+s1c+s1k+s1f+s1d+s1e)
ImageWindow.document.write(s2a+s2b+s2c+s3a+s3b+s3c)
ImageWindow.document.write(s9)
ImageWindow.document.close()
}


function statscroll() {
debut=texte_scroll.substring(ii,texte_scroll.length);
fin=texte_scroll.substring(0,ii);
window.status=debut+fin;
if (ii < texte_scroll.length) ii++;else ii=0;
setTimeout("statscroll()",100);}



function getParms()
{	
  if(window.location.search.length > 1)	
  {		
    var parms = window.location.search.substring(1).split("&");		
    var parmList = new Array();		
    for(var i = 0; i < parms.length; i++)
    {			
      parmList[i] = new Object;			
      parmList[i].name = parms[i].substring(0,parms[i].indexOf("="));			
      parmList[i].value = parms[i].substring(parms[i].indexOf("=")+1);		
    }		
    return parmList;	
  }	
  else return null;
}


function frameControl(frmDefault,frmName)
{	
	var Parms = getParms();
	if(Parms != null)
	{
		for(var i = 0; i < Parms.length; i++)
		{
			if (Parms[i].name=="page") 
			{
				frmName.location=Parms[i].value
			}
		}
	}
	else
	{
		frmName.location=frmDefault
	}
}
