var alphabets = 'abcdefghijklmnopqrstuvwxyz';
var numbers = '0123456789';
var specialChars = '~`!@#$%^&*()_-+={[]}:;"\'\\|<,>.?/';
function gE(sId){return document.getElementById(sId);}
function sE(sId){return gE(sId).style;}
function hi(id,type){
	if(type==1)	Effect.Fade(id);
	else if(type==2) Effect.BlindUp(id);
	else if(type==3){Effect.Fade(id);Effect.BlindUp(id);}
	else if(type==4) Effect.SwitchOff(id);
	else if(type==5) Effect.SlideUp(id);
	else if(type==6) Effect.Squish(id);
	else{
		if(typeof id == 'object') id.style.display = 'none';
		else gE(id).style.display = 'none';
	}
}
function setMulti(obj,sTarget){
	max = obj.options.length;
	pages = '';
	for(i=0;i<max;i++){
		if(obj.options[i].selected) pages += obj.options[i].value+','; 
	}
	gE(sTarget).value = pages.substr(0,pages.length-1);
}

function sh(id,type){
	if(type==1)	Effect.Appear(id);
	else if(type==2) Effect.BlindDown(id);
	else if(type==3){Effect.Appear(id);Effect.BlindDown(id);}
	else if(type==4) Effect.Grow(id);
	else if(type==5) Effect.SlideDown(id);
	else if(type==6) Effect.Pulsate(id);
	else{
		if(typeof id == 'object') id.style.display = 'block';
		else gE(id).style.display = 'block';
	}	
}
function soh(obj,id,type){
	if(obj.checked){
		if(type) sh(id,2);
		else hi(id,2);
	}
	else{
		if(type) hi(id,2);
		else sh(id,2);
	}
}
function allCheck(prefix,maxid,checkerOwn){
	if(typeof maxid=='undefined') maxid = 'max';
	if(typeof checkerOwn=='undefined') checkerOwn = 'checkerOwn';
	max = parseInt(gE(maxid).value);
	ch = false;
	if(gE(checkerOwn)==null){
		for(i=0;i<=max;i++) if(!gE(prefix+i).checked){ch=true; break;}
	}
	else if(gE(checkerOwn).checked) ch = true;
	for(i=0;i<=max;i++) gE(prefix+i).checked = ch;
}
function mailCheck(type){
	if(typeof gE('max')=='undefined') return '';
	var max = gE('max').value;
	var allChecked = true;
	for(i=0;i<=max;i++){
		if(gE('seen'+i).value==type) gE('mail'+i).checked = true;
		else{allChecked = false;gE('mail'+i).checked = false;}
	}
	if(allChecked) gE('checkerOwn').checked = true;
	else gE('checkerOwn').checked = false;
}
function ss(){sh('loading',1);}
function ccp(type){
	max = parseInt(gE('max').value);
	if(type){
		d = document.createElement('div');
		d.id = 'aw'+max;
		
		d.innerHTML = '<span class="subject"><label for="answer'+max+'">'+gE('ante').value+' '+max+'</label></span><div class="data"><input type="text" class="textbox" style="width:275px;" id="answer'+max+'" name="answer'+max+'" /></div>';
		gE('answers').appendChild(d);
		gE('max').value = max+1;
	}
	else{
		gE('answers').removeChild(gE('aw'+(max-1)));
		gE('max').value = max-1;
	}
}
function evf(){
	for(i=1;i<=gE('max').value;i++) gE('rad'+i).style.display = '';
}
function setDate(){
	if(!gE('date')) return null;
	if(!gE('year')){
		gE('date').value = '0000-00-00';
		return false;
	}
	var year,month,day;
	year=gE('year').value?gE('year').value:'0000';
	month = gE('month').value;
	day = gE('day').value;
	month = month.length==1?'0'+month:month;
	day = day.length==1?'0'+day:day;
	gE('date').value = year+'-'+month+'-'+day;
}
function he(){
	var wh;
	if(window.innerHeight&&window.scrollMaxY) wh=self.innerHeight+self.scrollMaxY;
	else if(document.body.scrollHeight>document.body.offsetHeight) wh=document.body.scrollHeight;
	else{
		wh=document.getElementsByTagName("html").item(0).offsetHeight;
		wh=(wh<document.body.offsetHeight)?document.body.offsetHeight:wh;
	}
	return parseInt(wh);
};
function deleteMails(){
	max = parseInt(gE('max').value);
	ids = '';
	for(i=0;i<=max;i++) if(gE('mail'+i).checked) ids += gE('mail'+i).value+',';
	ids = ids.substr(0,ids.length-1);
	return ids;
}
function showLarge(){
	startLytebox('mainImg');
}
function showImage(suf){
	for(i=1;i<=11;i++){
		if(gE('tab'+i)) gE('tab'+i).className = 'pageNum';
		else break;
	}
	gE('tab'+suf).className='tabActive';
	gE('imgTarget').innerHTML = '<a href="javascript:;" onclick="showLarge();"><img src="'+gE('imgUrl').value+'_'+suf+'.jpg" id="mainImg" /></a>';
}
function shhi(){
	if(gE('sform').style.display!='none'){
		hi('sform',3);
		gE('expcol').src = 'design/pic/up.png';
		expire=3600*24*365;
		$a.l('cookie','expanded','ok',expire);
	}
	else {
		sh('sform',3);
		gE('expcol').src = 'design/pic/down.png';
		$a.l('cookie','expanded','',-1);
	}
}
function cctl(i){
	if(gE('product'+i).checked){
		gE('gc'+i).innerHTML ='<input type="text" id="count'+i+'" name="count'+i+'" size="1" value="1" /> <label for="count'+i+'">'+gE('textT').value+'</label>';
	}
	else{
		gE('gc'+i).innerHTML = '<label for="product'+i+'">'+gE('labelT').value+'</label>';
	}
}
function setSize(){var h=he();gE('overlay').style.height=h+'px';}
window.onresize = setSize;
function showLoginForm(){
	if(document.documentElement) document.documentElement.scrollTop = 0;
	else if(document.body) document.body.scrollTop = 0;
	if(!gE('loginForm')){
		var div=document.createElement('div');
		div.id='loginForm';
		div.className = 'login';
		gE('panel').appendChild(div);
	}
	if(document.all) toggleEvilTags();
	Effect.Appear('overlay',{to:0.7});
	if(gE('loginForm').innerHTML&&gE('loginForm').style.display=='none') Effect.Appear('loginForm');
	else $a.l('lm','Account:Login','loginForm');
}
function hideAll(){
	hi('overlay',1);
	if(gE('commentForm')) hi('commentForm',1);
	if(gE('loginForm')) hi('loginForm',1);
	if(document.all) toggleEvilTags(1);
}
function toggleEvilTags(){
	var state = arguments[0]?'visible':'hidden';
	var objects = document.getElementsByTagName("object");
	for(var i=0;i<objects.length;i++) objects[i].style.visibility=state;
	var selects = document.getElementsByTagName("select");
	for(var i=0;i<selects.length;i++) selects[i].style.visibility=state;
	var embeds = document.getElementsByTagName("embed");
	for(i=0;i<embeds.length;i++) embeds[i].style.visibility=state;
}
function showCommentForm(){
	if(!gE('commentForm')){
		var div=document.createElement('div');
		div.id='commentForm';
		div.className = 'login';
		div.style.height='230px';
		gE('panel').appendChild(div);
	}
	if(document.all) toggleEvilTags();
	Effect.Appear('overlay',{to:0.7});
	if(gE('commentForm').innerHTML&&gE('commentForm').style.display=='none') Effect.Appear('commentForm');
	else $a.l('lm','Comment:Form','commentForm');
}
var suf = 0;
function addFileUploader(){
	if(suf<20){
		file = document.createElement('input');
		file.type = 'file';
		suf++;
		file.name = 'image'+suf;
		file.id = 'img'+suf;
		file.className = 'textbox';
		file.size = 44;
		gE('morefile').appendChild(file);
		gE('fileNum').value = suf;
		if(suf) gE('remove').disabled = false;
	}
	if(suf>19) gE('add').disabled = true;
}
function removeFileUploader(){
	if(suf>0){
		gE('morefile').removeChild(gE('img'+suf));
		suf--;
		gE('fileNum').value = suf;
		if(suf<20) gE('add').disabled = false;
	}
	if(!suf) gE('remove').disabled = true;
}
var alphabets = 'abcdefghijklmnopqrstuvwxyz';
var numbers = '0123456789';
var specialChars = '~`!@#$%^&*()_-+={[]}:;"\'\\|<,>.?/';
function gE(sId){return document.getElementById(sId);}
function sE(sId){return gE(sId).style;}
function hi(id,type){
	if(type==1)	Effect.Fade(id);
	else if(type==2) Effect.BlindUp(id);
	else if(type==3){Effect.Fade(id);Effect.BlindUp(id);}
	else if(type==4) Effect.SwitchOff(id);
	else if(type==5) Effect.SlideUp(id);
	else if(type==6) Effect.Squish(id);
	else{
		if(typeof id == 'object') id.style.display = 'none';
		else gE(id).style.display = 'none';
	}
}
function setMulti(obj,sTarget){
	max = obj.options.length;
	pages = '';
	for(i=0;i<max;i++){
		if(obj.options[i].selected) pages += obj.options[i].value+','; 
	}
	gE(sTarget).value = pages.substr(0,pages.length-1);
}

function sh(id,type){
	if(type==1)	Effect.Appear(id);
	else if(type==2) Effect.BlindDown(id);
	else if(type==3){Effect.Appear(id);Effect.BlindDown(id);}
	else if(type==4) Effect.Grow(id);
	else if(type==5) Effect.SlideDown(id);
	else if(type==6) Effect.Pulsate(id);
	else{
		if(typeof id == 'object') id.style.display = 'block';
		else gE(id).style.display = 'block';
	}	
}
function soh(obj,id,type){
	if(obj.checked){
		if(type) sh(id,2);
		else hi(id,2);
	}
	else{
		if(type) hi(id,2);
		else sh(id,2);
	}
}
function allCheck(prefix,maxid,checkerOwn){
	if(typeof maxid=='undefined') maxid = 'max';
	if(typeof checkerOwn=='undefined') checkerOwn = 'checkerOwn';
	max = parseInt(gE(maxid).value);
	ch = false;
	if(gE(checkerOwn)==null){
		for(i=0;i<=max;i++) if(!gE(prefix+i).checked){ch=true; break;}
	}
	else if(gE(checkerOwn).checked) ch = true;
	for(i=0;i<=max;i++) gE(prefix+i).checked = ch;
}
function mailCheck(type){
	if(typeof gE('max')=='undefined') return '';
	var max = gE('max').value;
	var allChecked = true;
	for(i=0;i<=max;i++){
		if(gE('seen'+i).value==type) gE('mail'+i).checked = true;
		else{allChecked = false;gE('mail'+i).checked = false;}
	}
	if(allChecked) gE('checkerOwn').checked = true;
	else gE('checkerOwn').checked = false;
}
function ss(){sh('loading',1);}
function ccp(type){
	max = parseInt(gE('max').value);
	if(type){
		d = document.createElement('div');
		d.id = 'aw'+max;
		
		d.innerHTML = '<span class="subject"><label for="answer'+max+'">'+gE('ante').value+' '+max+'</label></span><div class="data"><input type="text" class="textbox" style="width:275px;" id="answer'+max+'" name="answer'+max+'" /></div>';
		gE('answers').appendChild(d);
		gE('max').value = max+1;
	}
	else{
		gE('answers').removeChild(gE('aw'+(max-1)));
		gE('max').value = max-1;
	}
}
function evf(){
	for(i=1;i<=gE('max').value;i++) gE('rad'+i).style.display = '';
}
function setDate(){
	if(!gE('date')) return null;
	if(!gE('year')){
		gE('date').value = '0000-00-00';
		return false;
	}
	var year,month,day;
	year=gE('year').value?gE('year').value:'0000';
	month = gE('month').value;
	day = gE('day').value;
	month = month.length==1?'0'+month:month;
	day = day.length==1?'0'+day:day;
	gE('date').value = year+'-'+month+'-'+day;
}
function he(){
	var wh;
	if(window.innerHeight&&window.scrollMaxY) wh=self.innerHeight+self.scrollMaxY;
	else if(document.body.scrollHeight>document.body.offsetHeight) wh=document.body.scrollHeight;
	else{
		wh=document.getElementsByTagName("html").item(0).offsetHeight;
		wh=(wh<document.body.offsetHeight)?document.body.offsetHeight:wh;
	}
	return parseInt(wh);
};
function deleteMails(){
	max = parseInt(gE('max').value);
	ids = '';
	for(i=0;i<=max;i++) if(gE('mail'+i).checked) ids += gE('mail'+i).value+',';
	ids = ids.substr(0,ids.length-1);
	return ids;
}
function showLarge(num){
	var imgs = new Array();
	var parts = gE('mainImg').src.split('/');
	var imageName = parts.pop();
	imageName = imageName.replace('.jpg','');
	var k = 0;
	parts = imageName.split('_');
	var id = parts[0];
	for(var i=1;i<=num;i++){
		if(imageName!=id+'_'+i){
			imgs[k] = id+'_'+i;
			k++;
		}
	}
	startLytebox('mainImg',imgs);
}
function showImage(suf){
	for(i=1;i<=11;i++){
		if(gE('tab'+i)) gE('tab'+i).className = 'pageNum';
		else{i--;break;}
	}
	gE('tab'+suf).className='tabActive';
	gE('imgTarget').innerHTML = '<a href="javascript:;" onclick="showLarge('+i+');"><img src="'+gE('imgUrl').value+'_'+suf+'.jpg" id="mainImg" /></a>';
}
function shhi(){
	if(gE('sform').style.display!='none'){
		hi('sform',3);
		gE('expcol').src = 'design/pic/up.png';
		expire=3600*24*365;
		$a.l('cookie','expanded','ok',expire);
	}
	else {
		sh('sform',3);
		gE('expcol').src = 'design/pic/down.png';
		$a.l('cookie','expanded','',-1);
	}
}
function cctl(i){
	if(gE('product'+i).checked){
		gE('gc'+i).innerHTML ='<input type="text" id="count'+i+'" name="count'+i+'" size="1" value="1" /> <label for="count'+i+'">'+gE('textT').value+'</label>';
	}
	else{
		gE('gc'+i).innerHTML = '<label for="product'+i+'">'+gE('labelT').value+'</label>';
	}
}
function setSize(){var h=he();gE('overlay').style.height=h+'px';}
window.onresize = setSize;
function showLoginForm(){
	if(document.documentElement) document.documentElement.scrollTop = 0;
	else if(document.body) document.body.scrollTop = 0;
	if(!gE('loginForm')){
		var div=document.createElement('div');
		div.id='loginForm';
		div.className = 'login';
		gE('panel').appendChild(div);
	}
	if(document.all) toggleEvilTags();
	Effect.Appear('overlay',{to:0.7});
	if(gE('loginForm').innerHTML&&gE('loginForm').style.display=='none') Effect.Appear('loginForm');
	else $a.l('lm','Account:Login','loginForm');
}
function hideAll(){
	hi('overlay',1);
	if(gE('commentForm')) hi('commentForm',1);
	if(gE('loginForm')) hi('loginForm',1);
	if(document.all) toggleEvilTags(1);
}
function toggleEvilTags(){
	var state = arguments[0]?'visible':'hidden';
	var objects = document.getElementsByTagName("object");
	for(var i=0;i<objects.length;i++) objects[i].style.visibility=state;
	var selects = document.getElementsByTagName("select");
	for(var i=0;i<selects.length;i++) selects[i].style.visibility=state;
	var embeds = document.getElementsByTagName("embed");
	for(i=0;i<embeds.length;i++) embeds[i].style.visibility=state;
}
function showCommentForm(){
	if(!gE('commentForm')){
		var div=document.createElement('div');
		div.id='commentForm';
		div.className = 'login';
		div.style.height='230px';
		gE('panel').appendChild(div);
	}
	if(document.all) toggleEvilTags();
	Effect.Appear('overlay',{to:0.7});
	if(gE('commentForm').innerHTML&&gE('commentForm').style.display=='none') Effect.Appear('commentForm');
	else $a.l('lm','Comment:Form','commentForm');
}
function lockBg(id){
	if(!gE(id)){
		var div=document.createElement('div');
		div.id=id;
		if(arguments[2]) div.className = arguments[2];
		document.getElementsByTagName('body')[0].appendChild(div);
	}
	if(!gE(id).innerHTML) $a.l('lm',arguments[1],id);
	Effect.Appear(id);
}
function tri(r,i){
	if(gE('replyInfo'+r).style.display=='none'){
		if(!gE('replyInfo'+r).innerHTML) $a.l('loadReply',r);
		else sh('replyInfo'+r,3);
		i.src = i.src.replace('down','up');
	}else{hi('replyInfo'+r,3);i.src = i.src.replace('up','down');}
}
function shhi(){
	if(gE('sform').style.display!='none'){
		hi('sform',3);
		gE('expcol').src = 'design/pic/up.png';
		expire=3600*24*365;
		$a.l('cookie','expanded','ok',expire);
	}
	else {
		sh('sform',3);
		gE('expcol').src = 'design/pic/down.png';
		$a.l('cookie','expanded','',-1);
	}
}
function changer(id,limit){
	var count = parseInt(gE('count'+id).innerHTML,10);
	var html = '<input type="text" value="'+count+'" size="2" onkeyup="if(parseInt(this.value,10)>'+limit+') this.value='+limit+';" onblur="$a.l(\'updateOrderCount\','+id+',this.value);gE(\'count'+id+'\').innerHTML = this.value;" />';
	gE('count'+id).innerHTML = html;	
}
function setTotalPrice(){
	var total=0,gId,max=parseInt(gE('max').value,10);
	for(var i=1;i<=max;i++){
		gId = parseInt(gE('goodsId'+i).value,10);
		total+=parseInt(gE('totalPrice'+gId).innerHTML,10);
	}
	gE('sumTotalPrice').innerHTML = total;
}
function showLit(pn){if(pn==0){gE('mm').value--;if(gE('mm').value==0){gE('mm').value=12;gE('yy').value--;}}else if(pn==1){gE('mm').value++;if(gE('mm').value==13){gE('mm').value=1;gE('yy').value++;}}if(gE('yy').value<1970) gE('yy').value=1970;else if(gE('yy').value>2100) gE('yy').value=2100;$a.l('showLit',gE('yy').value,gE('mm').value);}
function clearBasket(){$a.l('clearSession','MY.B');}



/**   menu*/




  var dhtmlgoodies_menuObj;   
   var currentZIndex = 1000; 
   var liIndex = 0; 
   var visibleMenus = new Array(); 
   var activeMenuItem = false; 
   var timeBeforeAutoHide = 1200; 
   var dhtmlgoodies_menu_arrow = '../pic/arrow_r.gif';     
   var MSIE = navigator.userAgent.indexOf('MSIE')>=0?true:false; 
   var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox')>=0?true:false; 
   var navigatorVersion = navigator.appVersion.replace(/.*?MSIE ([0-9]\.[0-9]).*/g,'$1')/1; 
   var menuBlockArray = new Array(); 
   var menuParentOffsetLeft = false;    
   function getStyle(el,property) 
   {
      if (document.defaultView && document.defaultView.getComputedStyle) { 
         var retVal = null;              
         var comp = document.defaultView.getComputedStyle(el, ''); 
         if (comp){ 
            retVal = comp[property]; 
              
            if(!retVal){ 
               var comp = document.defaultView.getComputedStyle(el, null); 
               retVal = comp.getPropertyCSSValue(property); 
            }          
         }    

         if(retVal==null)retVal=''; 
          
         return el.style[property] || retVal; 
      } 
      if (document.documentElement.currentStyle && MSIE){    
         var value = el.currentStyle ? el.currentStyle[property] : null; 
         return ( el.style[property] || value ); 
                                              
      } 
      return el.style[property];              
   }       
   function getTopPos(inputObj) 
   { 
   	var origInputObj = inputObj;
 
     var returnValue = inputObj.offsetTop; 
     if(inputObj.tagName=='LI' && inputObj.parentNode.className=='menuBlock1'){    
        var aTag = inputObj.getElementsByTagName('A')[0]; 
        if(aTag)returnValue += aTag.parentNode.offsetHeight; 
     } 
     var topOfMenuReached = false; 
     while((inputObj = inputObj.offsetParent) != null){ 
        if(inputObj.parentNode.id=='dhtmlgoodies_menu')topOfMenuReached=true; 
        if(topOfMenuReached && !inputObj.className.match(/menuBlock/gi) || (!MSIE && origInputObj.parentNode.className=='menuBlock1')){ 
           var style = getStyle(inputObj,'position'); 
           if(style=='absolute' || style=='relative'){                
              return returnValue;            
           } 
        }           
        returnValue += inputObj.offsetTop;          
     } 
     return returnValue; 
   }     
   function getLeftPos(inputObj) 
   { 
     var returnValue = inputObj.offsetLeft;       
     var topOfMenuReached = false; 
     while((inputObj = inputObj.offsetParent) != null){ 
       if(inputObj.parentNode.id=='dhtmlgoodies_menu')topOfMenuReached=true; 
        if(topOfMenuReached && !inputObj.className.match(/menuBlock/gi)){ 
           var style = getStyle(inputObj,'position'); 
           if(style=='absolute' || style=='relative')return returnValue; 
        } 
      
        returnValue += inputObj.offsetLeft; 
     } 
     return returnValue; 
   }     
   function showHideSub() 
   { 
      var attr = this.parentNode.getAttribute('currentDepth'); 
      if(navigator.userAgent.indexOf('Opera')>=0){ 
         attr = this.parentNode.currentDepth; 
      } 
        
      this.className = 'currentDepth' + 'over'; 
        
      if(activeMenuItem && activeMenuItem!=this){ 
         activeMenuItem.className=activeMenuItem.className.replace(/over/,''); 
      } 
      activeMenuItem = this; 
    
      var numericIdThis = this.id.replace(/[^0-9]/g,''); 
      var exceptionArray = new Array(); 
      // Showing sub item of this LI 
      var sub = document.getElementById('subOf' + numericIdThis); 
      if(sub){ 
         visibleMenus.push(sub); 
         sub.style.display=''; 
         sub.parentNode.className = sub.parentNode.className + 'over'; 
         exceptionArray[sub.id] = true; 
      }    
        
      // Showing parent items of this one 
        
      var parent = this.parentNode; 
      while(parent && parent.id && parent.tagName=='UL'){ 
         visibleMenus.push(parent); 
         exceptionArray[parent.id] = true; 
         parent.style.display=''; 
          
         var li = document.getElementById('dhtmlgoodies_listItem' + parent.id.replace(/[^0-9]/g,'')); 
         if(li.className.indexOf('over')<0)li.className = li.className + 'over'; 
         parent = li.parentNode; 
          
      }           
      hideMenuItems(exceptionArray); 
   } 

   function hideMenuItems(exceptionArray) 
   { 
      /* 
      Hiding visible menu items 
      */ 
      var newVisibleMenuArray = new Array(); 
      for(var no=0;no<visibleMenus.length;no++){ 
         if(visibleMenus[no].className!='menuBlock1' && visibleMenus[no].id){ 
            if(!exceptionArray[visibleMenus[no].id]){ 
               var el = visibleMenus[no].getElementsByTagName('A')[0]; 
               visibleMenus[no].style.display = 'none'; 
               var li = document.getElementById('dhtmlgoodies_listItem' + visibleMenus[no].id.replace(/[^0-9]/g,'')); 
               if(li.className.indexOf('over')>0)li.className = li.className.replace(/over/,''); 
            }else{              
               newVisibleMenuArray.push(visibleMenus[no]); 
            } 
         } 
      }        
      visibleMenus = newVisibleMenuArray;        
   }            
   var menuActive = true; 
   var hideTimer = 0; 
   function mouseOverMenu() 
   { 
      menuActive = true;        
   } 
    
   function mouseOutMenu() 
   { 
      menuActive = false; 
      timerAutoHide();    
   } 
    
   function timerAutoHide() 
   { 
      if(menuActive){ 
         hideTimer = 0; 
         return; 
      } 
        
      if(hideTimer<timeBeforeAutoHide){ 
         hideTimer+=100; 
         setTimeout('timerAutoHide()',99); 
      }else{ 
         hideTimer = 0; 
         autohideMenuItems();    
      } 
   } 
    
   function autohideMenuItems() 
   { 
      if(!menuActive){ 
         hideMenuItems(new Array());    
         if(activeMenuItem)activeMenuItem.className=activeMenuItem.className.replace(/over/,'');        
      } 
   } 
    
    
   function initSubMenus(inputObj,initOffsetLeft,currentDepth) 
   {    
      var subUl = inputObj.getElementsByTagName('UL'); 
      if(subUl.length>0){ 
         var ul = subUl[0]; 
          
         ul.id = 'subOf' + inputObj.id.replace(/[^0-9]/g,''); 
         ul.setAttribute('currentDepth' ,currentDepth); 
         ul.currentDepth = currentDepth; 
         ul.className='menuBlock' + currentDepth; 
         ul.onmouseover = mouseOverMenu; 
         ul.onmouseout = mouseOutMenu; 
         currentZIndex+=1; 
         ul.style.zIndex = currentZIndex; 
         menuBlockArray.push(ul); 
         ul = dhtmlgoodies_menuObj.appendChild(ul); 
         var topPos = getTopPos(inputObj); 
         var leftPos = getLeftPos(inputObj)/1 + initOffsetLeft/1;                   
         ul.style.position = 'absolute'; 
         ul.style.left = leftPos + 'px'; 
         ul.style.top = topPos + 'px'; 
         var li = ul.getElementsByTagName('LI')[0]; 
         while(li){ 
            if(li.tagName=='LI'){    
               li.className='currentDepth' + currentDepth;                
               li.id = 'dhtmlgoodies_listItem' + liIndex; 
               liIndex++;              
               var uls = li.getElementsByTagName('UL'); 
               li.onmouseover = showHideSub; 

               if(uls.length>0){ 
                  var offsetToFunction = li.getElementsByTagName('A')[0].offsetWidth+2; 
                  if(navigatorVersion<6 && MSIE)offsetToFunction+=15;   // MSIE 5.x fix 
                  initSubMenus(li,offsetToFunction,(currentDepth+1)); 
               }    
               if(MSIE){ 
                  var a = li.getElementsByTagName('A')[0]; 
                  a.style.width=li.offsetWidth+'px'; 
                  a.style.display='block'; 
               }                
            } 
            li = li.nextSibling; 
         } 
         ul.style.display = 'none';    
         if(!document.all){ 
            //dhtmlgoodies_menuObj.appendChild(ul); 
         } 
      }    
   } 


   function resizeMenu() 
   { 
      var offsetParent = getLeftPos(dhtmlgoodies_menuObj); 
        
      for(var no=0;no<menuBlockArray.length;no++){ 
         var leftPos = menuBlockArray[no].style.left.replace('px','')/1; 
         menuBlockArray[no].style.left = leftPos + offsetParent - menuParentOffsetLeft + 'px'; 
      } 
      menuParentOffsetLeft = offsetParent; 
   } 
    
   /* 
   Initializing menu 
   */ 
   function initDhtmlGoodiesMenu() 
   { 
      dhtmlgoodies_menuObj = document.getElementById('dhtmlgoodies_menu');                 
      var aTags = dhtmlgoodies_menuObj.getElementsByTagName('A'); 
      for(var no=0;no<aTags.length;no++){          
         var subUl = aTags[no].parentNode.getElementsByTagName('UL'); 
         if(subUl.length>0 && aTags[no].parentNode.parentNode.parentNode.id != 'dhtmlgoodies_menu'){ 
            var img = document.createElement('IMG'); 
            img.src = dhtmlgoodies_menu_arrow; 
            aTags[no].appendChild(img);              

         } 

      } 
              
      var mainMenu = dhtmlgoodies_menuObj.getElementsByTagName('UL')[0]; 
      mainMenu.className='menuBlock1'; 
      mainMenu.style.zIndex = currentZIndex; 
      mainMenu.setAttribute('currentDepth' ,1); 
      mainMenu.currentDepth = '1'; 
      mainMenu.onmouseover = mouseOverMenu; 
      mainMenu.onmouseout = mouseOutMenu;        
      var mainMenuItemsArray = new Array(); 
      var mainMenuItem = mainMenu.getElementsByTagName('LI')[0]; 
      mainMenu.style.height = mainMenuItem.offsetHeight + 'px'; 
      while(mainMenuItem){ 
          
         mainMenuItem.className='currentDepth'; 
         mainMenuItem.id = 'dhtmlgoodies_listItem' + liIndex; 
         mainMenuItem.onmouseover = showHideSub; 
         liIndex++;              
         if(mainMenuItem.tagName=='LI'){ 
            mainMenuItem.style.cssText = 'float:left;';    
            mainMenuItem.style.styleFloat = 'left'; 
            mainMenuItemsArray[mainMenuItemsArray.length] = mainMenuItem; 
            initSubMenus(mainMenuItem,0,2); 
         }                    
         mainMenuItem = mainMenuItem.nextSibling;           
      } 
      for(var no=0;no<mainMenuItemsArray.length;no++){ 
         initSubMenus(mainMenuItemsArray[no],0,2);          
      }         
      menuParentOffsetLeft = getLeftPos(dhtmlgoodies_menuObj);    
      window.onresize = resizeMenu;    
      dhtmlgoodies_menuObj.style.visibility = 'visible';    
   } 	
function showForm(which){
	if(which==1){
    	    sh('form1',8);
            hi('form2',8);    		
            gE('tab1').className = 'ftab1';            
    		gE('tab2').className = 'ftabNo2';    		
		}
	else if(which==2){
			hi('form1',8);
            sh('form2',8);				
		    gE('tab1').className = 'ftabNo1';
			gE('tab2').className = 'ftab2';			
 	}	
}
function showL(which){
    if(which==1){        
        sh('formform',8);        
    }
    else if(which==2){
        hi('formform',8);
    }        
}
