var d=document;
function changeCSSAtributes(obj,attributes,values){
 var al=attributes.length; 
 if(attributes&&attributes.pop)
    for(var i=0;i<al;i++)obj.style[attributes[i]]=values[i]
 else obj.style[attributes]=values;
}
function changeImage(ImgPath,ImgName,ImgType,State){
  d.images[ImgName].src=imgBasePath+ImgPath+ImgName+State+"."+ImgType;
  return true;
}
function find_obj(n,d) {
 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=find_Obj(n,d.layers[i].document);
 if(!x&&d.getElementById)x=d.getElementById(n);
 return x;
}
function writeFlashObject(classid,width,height,fileName){
 document.write('<object classid="clsid:'+classid+'" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">');
 document.write('<param name="movie" value="'+fileName+'" />');
 document.write('<param name="quality" value="high" />');
 document.write('<embed src="'+fileName+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>');
 document.write('</object>');
}  
function sh(id){
 a=isNaN(parseInt(sTab[id]))?1:sTab[id];
 var inTab=0;
 for(var i=0;i<=IdTab.length-1;i++){
     if(IdTab[i]==id){
        inTab=1;
     }else{
        dL(null,IdTab[i],0);
        sTab[IdTab[i]]=1;
     }
 }
 if(!inTab)IdTab[IdTab.length]=id;
 dL(null,id,(a?'table-row':0));
 if(a)location.hash='n_'+id;
 sTab[id]=a?0:1;
}
function isSet(v){return v in this}
function RemoveDashedLine(){for(a=0;a<d.links.length;)d.links[a].onfocus=d.links[a++].blur}
function serviceDelF(a,d1,d2,f){if(!a){setTimeout("serviceDelF("+(loaded?1:0)+","+d1+","+d2+",'"+f+"')",(loaded?d1:d2))}else{eval(f)}}
function resetForm(f){for(i=0;i<=f.length-1;i++){f[i].value=f[i].type=='select-one'?f[i][0].value:(f[i].type=='text'||f[i].type=='textarea'?'':f[i].value);}} 
function check_num(arg){return(arg.search(/\D/)<0?true:false)}
function check_email(arg){return(arg.search(/^[-a-z0-9._]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z][a-z]+$/i)<0?false:true)}
function showPict(pic,title){window.open('inc/showPicture.module.php?file='+pic+'&title='+title,'winH','toolbar=no,menubar=no,scrollbars=yes,resizable=yes');}

Array.prototype.in_array=function(obj){
 var len=this.length;
	for(var x=0;x<=len;x++){
		 if(this[x]==obj)return true;
	}
	return false;
}
