window.name = 'page';
/*--------------------------------------------------------------------------*/

var tgs = new Array( 'div','td','tr');
var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
var startSz = 2;
function ts( trgt,inc ) {
	if (!document.getElementById) return
	var d = document,cEl = null,sz = startSz,i,j,cTags;
	if(inc==0)
		sz = 2;
	else
	{
		sz += inc;
		if ( sz < 0 ) sz = 0;
		if ( sz > 6 ) sz = 6;
	}
	startSz = sz;
	if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];
	cEl.style.fontSize = szs[ sz ];
	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
	}
}
/*--------------------------------------------------------------------------*/
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
if ((version >= 5.5) && (version < 7) && (window.showModalDialog)) 
{
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText 
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}
/*--------------------------------------------------------------------------*/
/*
document.write('<style type="text/css">.tabber {display:none;}<\/style>');
var theInt = null;
var $crosslink, $navthumb;
var curclicked = 0;
theInterval = function(cur){
	clearInterval(theInt);
	if( typeof cur != 'undefined' )
		curclicked = cur;
	$crosslink.removeClass("active-thumb");
	$navthumb.eq(curclicked).parent().addClass("active-thumb");
		$(".stripNav ul li a").eq(curclicked).trigger('click');
	theInt = setInterval(function(){
		$crosslink.removeClass("active-thumb");
		$navthumb.eq(curclicked).parent().addClass("active-thumb");
		$(".stripNav ul li a").eq(curclicked).trigger('click');
		curclicked++;
		if( 6 == curclicked )
			curclicked = 0;
	}, 3000);
};
$(function(){
	$("#main-photo-slider").codaSlider();
	$navthumb = $(".nav-thumb");
	$crosslink = $(".cross-link");
	$navthumb
	.click(function() {
		var $this = $(this);
		theInterval($this.parent().attr('href').slice(1) - 1);
		return false;
	});
	theInterval();
});
*/
/*--------------------------------------------------------------------------*/
function Replace(exAll,exV,nwV) {
   var regEx = new RegExp(exV,"g");
   return newAll = exAll.replace(regEx,nwV);
   alert(exAll +':'+ newAll);
   return newAll;
}

function gebi(id){
	return document.getElementById(id);
}

function jsencode(ch) {
   ch = ch.replace(/\"/g,"&quot;")
   ch = ch.replace(/\'/g,"&#039;")
   return ch
}

function osForm(alertMsg, listInput){
	returned = true;
	tableau = listInput.split('|');
	for (i=0;i<tableau.length+1;i++) {
		champ = tableau[i];
		if (champ) {
			champ = champ.split(':');
			champI = champ[0];
			champL = '';
			if(champ[1]) champL = ' : '+ champ[1];
			if (document.getElementById(champI).value == ''){
				alert(alertMsg + champL );
				returned = false;
				return false;
			}
		}
	}
}

function upClassName(clsObject, clsName) {
	arrayClassName = clsObject.className.split(' ')
	newClassName = '';
	AclsName = clsName.substr(0,1)=='-' ? clsName.substr(1) : clsName
	for(var ii = 0; ii<arrayClassName.length; ii++) {
		if(arrayClassName[ii]!=AclsName) newClassName += ' '+ arrayClassName[ii];
	}
	if (clsName.substr(0,1)!='-') newClassName += ' '+ AclsName;
	clsObject.className = newClassName;
}

function uupClassName(clsObject, clsName) {
	arrayClassPlus = clsName.split(' ');
	arrayClassName = clsObject.className.split(' ');
	newClassName = '';

	for(var i = 0; i<arrayClassPlus.length; i++) {
		clsName = arrayClassPlus[i];
		AclsName = clsName.substr(0,1)=='-' ? clsName.substr(1) : clsName;
		for(var ii = 0; ii<arrayClassName.length; ii++) {
			if(arrayClassName[ii]!=AclsName) newClassName += ' '+ arrayClassName[ii];
		}
		if (clsName.substr(0,1)!='-') newClassName += ' '+ AclsName;
	}

	clsObject.className = newClassName;
}

function voletAct(voletLst, voletElm, prefixCmd, prefixCnt) {
	voletLst = voletLst.split(',');
	for(var ii = 0; ii<voletLst.length; ii++)
	{
		if(gebi(prefixCmd+voletLst[ii])) upClassName(gebi(prefixCmd+voletLst[ii]), '-vol_act');
		if(gebi(prefixCmd+voletLst[ii])) upClassName(gebi(prefixCmd+voletLst[ii]), 'vol_lst');
		if(gebi(prefixCnt+voletLst[ii])) upClassName(gebi(prefixCnt+voletLst[ii]), '-cnt_act');
		if(gebi(prefixCnt+voletLst[ii])) upClassName(gebi(prefixCnt+voletLst[ii]), 'cnt_lst');
	}
	if(gebi(prefixCmd+voletElm)) upClassName(gebi(prefixCmd+voletElm), '-vol_lst');
	if(gebi(prefixCmd+voletElm)) upClassName(gebi(prefixCmd+voletElm), 'vol_act');
	if(gebi(prefixCnt+voletElm)) upClassName(gebi(prefixCnt+voletElm), '-cnt_lst');
	if(gebi(prefixCnt+voletElm)) upClassName(gebi(prefixCnt+voletElm), 'cnt_act');
}

function wdcvonline_setVolet(divId, volId) {
	for(i=1; i=i++; i++)
	{
		if(!document.getElementById(divId+'_vol_'+i))return;
		document.getElementById(divId+'_vol_'+i).className = 'vol_lst';
		if(i==volId)document.getElementById(divId+'_vol_'+i).className = 'vol_act';
		if(document.getElementById(divId+'_vol_'+i)){
			document.getElementById(divId+'_cnt_'+i).className = 'cnt_lst';
			if(i==volId)document.getElementById(divId+'_cnt_'+i).className = 'cnt_act';
		}
	}
}

function setVolet(volLst, volId) {
	if(document.getElementById('aplVol')) document.getElementById('aplVol').value=volId;
	for(i=1; i=i++; i++)
	{
		if(!document.getElementById(divId+'_vol_'+i))return;
		document.getElementById(divId+'_vol_'+i).className = Replace(document.getElementById(divId+'_vol_'+i).className, 'vol_act','vol_lst');
		if(i==volId)document.getElementById(divId+'_vol_'+i).className = Replace(document.getElementById(divId+'_vol_'+i).className, 'vol_lst','vol_act');
		if(document.getElementById(divId+'_cnt_'+i)){
			document.getElementById(divId+'_cnt_'+i).className = Replace(document.getElementById(divId+'_cnt_'+i).className, 'cnt_act','cnt_lst');
			if(i==volId)document.getElementById(divId+'_cnt_'+i).className = Replace(document.getElementById(divId+'_cnt_'+i).className, 'cnt_lst','cnt_act');
		}
	}
}

var divThis = '';
/*--------------------------------------------------------------------------*/
