// Строка статуса 
//window.defaultStatus = "• Web-Media Studio • Saint-Petersburg • Russia • ©2001" ;
//parent.defaultStatus = "ОАО «СТРОИТЕЛЬНАЯ КОРПОРЦИЯ «ВОЗРОЖДЕНИЕ САНКТ-ПЕТЕРБУРГА»" ;
//parent.document.title = "ОАО «СТРОИТЕЛЬНАЯ КОРПОРЦИЯ «ВОЗРОЖДЕНИЕ САНКТ-ПЕТЕРБУРГА»" ;


var bName = navigator.appName.indexOf("Internet Explorer") ;
/*
function click() {
	if (event.button==2) {
		var rus_str = ' Copyright © 2001 «Web-Media Studio»' ; //' Copyright © 2001 «Гефест»\n\n Все права защищены.\n' ;
		alert( rus_str );
		return false;
	}
}
document.onmousedown=click
*/
// загружаем стили  в зависимости от Броузера 
/*
if( navigator.appName.indexOf("Internet Explorer")==-1 ){		// те БРОУЗЕР не MS IExplorer
	if( navigator.appName.indexOf("Netscape")>=0 ){		// те БРОУЗЕР Netscape Navigator
		document.writeln( "<link rel='stylesheet' href='/common/nn.css'>" );
	}
}else{
	document.writeln( "<link rel='stylesheet' href='/common/ie.css'>" );
}

*/
/////////////////////////////////////////////////////////////////////////////////////////////////
///
///		Dreamweaver Functions
///
/////////////////////////////////////////////////////////////////////////////////////////////////
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
//
MM_reloadPage(true);
//
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
//
function MM_findObj(n, d) { //v4.0
  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=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
//
function MM_showHideLayers() { //v3.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { 
		v=args[i+2];
		if (obj.style) { 
			obj=obj.style; 
			v=(v=='show')?'visible':(v='hide')?'hidden':v; 
		}
		obj.visibility=v;
	}
}
//
function P7_hideDiv(evt) { //v1.3 by PVII
 var b,relT,mT=false; 
 if(document.layers){b=evt.target;if(b.p7aHide){
  b.visibility="hidden";}else{routeEvent(evt);}
 }else if(document.all&&!window.opera){b=event.srcElement;
  while(b!=null){if(b.tagName=="DIV" && b.p7ahD){mT=true;break;}b=b.parentElement;}
  if(!b.contains(event.toElement)){b.style.visibility="hidden";}
 }else if(document.getElementById){b=evt.currentTarget;relT=evt.relatedTarget;
  while(relT!=null){if(b==relT){mT=true;break;}
  relT=relT.parentNode;}if(!mT){b.style.visibility="hidden";}}
}
//
function P7_autoHide() { //v1.3 by PVII
 var i,g,args=P7_autoHide.arguments;
 for(i=0;i<args.length;i++){if((g=MM_findObj(args[i]))!=null){
  g.p7aHide=true;if(document.layers){
  g.captureEvents(Event.MOUSEOUT);}g.onmouseout=P7_hideDiv;g.p7ahD=true;}}
}
//
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//
function P7_autoLayers() { //v1.4 by PVII
 var g,b,k,f,args=P7_autoLayers.arguments;a=parseInt(args[0]);if(isNaN(a))a=0;
 if(!document.p7setc){p7c=new Array();document.p7setc=true;for(var u=0;u<10;u++){
 p7c[u]=new Array();}}for(k=0;k<p7c[a].length;k++){if((g=MM_findObj(p7c[a][k]))!=null){
 b=(document.layers)?g:g.style;b.visibility="hidden";}}for(k=1;k<args.length;k++){
 if((g=MM_findObj(args[k]))!=null){b=(document.layers)?g:g.style;b.visibility="visible";f=false;
 for(var j=0;j<p7c[a].length;j++){if(args[k]==p7c[a][j]) {f=true;}}
 if(!f){p7c[a][p7c[a].length++]=args[k];}}}
}
//
function P7_Snap() { //v2.62 by PVII
  var x,y,ox,bx,oy,p,tx,a,b,k,d,da,e,el,args=P7_Snap.arguments;a=parseInt(a);
  for (k=0; k<(args.length-3); k+=4)
   if ((g=MM_findObj(args[k]))!=null) {
    el=eval(MM_findObj(args[k+1]));
    a=parseInt(args[k+2]);b=parseInt(args[k+3]);
    x=0;y=0;ox=0;oy=0;p="";tx=1;da="document.all['"+args[k]+"']";
    if(document.getElementById) {
     d="document.getElementsByName('"+args[k]+"')[0]";
     if(!eval(d)) {d="document.getElementById('"+args[k]+"')";if(!eval(d)) {d=da;}}
    }else if(document.all) {d=da;} 
    if (document.all || document.getElementById) {
     while (tx==1) {p+=".offsetParent";
      if(eval(d+p)) {x+=parseInt(eval(d+p+".offsetLeft"));y+=parseInt(eval(d+p+".offsetTop"));
      }else{tx=0;}}
     ox=parseInt(g.offsetLeft);oy=parseInt(g.offsetTop);var tw=x+ox+y+oy;
     if(tw==0 || (navigator.appVersion.indexOf("MSIE 4")>-1 && navigator.appVersion.indexOf("Mac")>-1)) {
      ox=0;oy=0;if(g.style.left){x=parseInt(g.style.left);y=parseInt(g.style.top);
      }else{var w1=parseInt(el.style.width);bx=(a<0)?-5-w1:-10;
      a=(Math.abs(a)<1000)?0:a;b=(Math.abs(b)<1000)?0:b;
      x=document.body.scrollLeft + event.clientX + bx;
      y=document.body.scrollTop + event.clientY;}}
   }else if (document.layers) {x=g.x;y=g.y;var q0=document.layers,dd="";
    for(var s=0;s<q0.length;s++) {dd='document.'+q0[s].name;
     if(eval(dd+'.document.'+args[k])) {x+=eval(dd+'.left');y+=eval(dd+'.top');break;}}}
   if(el) {e=(document.layers)?el:el.style;
   var xx=parseInt(x+ox+a),yy=parseInt(y+oy+b);
   if(navigator.appName=="Netscape" && parseInt(navigator.appVersion)>4){xx+="px";yy+="px";}
   if(navigator.appVersion.indexOf("MSIE 5")>-1 && navigator.appVersion.indexOf("Mac")>-1){
    xx+=parseInt(document.body.leftMargin);yy+=parseInt(document.body.topMargin);
    xx+="px";yy+="px";}e.left=xx;e.top=yy;}}
}
/////////////////////////////////////////////////////////////////////////////////////////////////
//
//
//
function AddFav(url,alt,txt) {
	if (navigator.userAgent.indexOf('MSIE')>0 ) {
			ver = parseInt(navigator.appVersion);
			if (ver > 3) window.external.AddFavorite(url,alt);
			if (ver > 4) this.SetHomePage(url);
	}
}
//
function setStatus(strStatus) {
	window.status = strStatus;
	//taintedStatus=taint(window.defaultStatus);
	return true ;
}
//
function setParentStatus(strStatus) {
	parent.status = strStatus;
	//taintedStatus=taint(window.defaultStatus);
	return true ;
}
//



/////////////////////////////////////////////////////////////////////////////////////////////////
//
//		F O R M		Functions
//
//
/////////////////////////////////////////////////////////////////////////////////////////////////
function fieldTextMy( Name , MaxChar, LenIE, LenNN , Class, Value) {
	if( bName!=-1 ){
		document.write("<input size="+LenIE+" name="+Name+" maxlength="+MaxChar+(Class==""?"":" class="+Class)+(Value==""?"":" value=\""+Value+"\"")+" onChange=\"chkInt(frm_register.age);\">" );
	}else{
		window.document.write("<input size="+LenNN+" name="+Name+" maxlength="+MaxChar+(Class==""?"":" class="+Class)+(Value==""?"":" value=\""+Value+"\"")+Other+" onChange=\"chkInt(frm_register.age);\">" );
	}
}

//============================================================================
function fieldTextJS( Name , MaxChar, LenIE, LenNN , Value, JS) {
	if( bName!=-1 ){
		document.write("<input size="+LenIE+" name="+Name+" maxlength="+MaxChar+(Value==""?"":" value=\""+Value+"\"")+(JS==""?"":" "+JS)+">" );
	}else{
		window.document.write("<input size="+LenNN+" name="+Name+" maxlength="+MaxChar+(Value==""?"":" value=\""+Value+"\"")+(JS==""?"":" "+JS)+">" );
	}
}

//============================================================================
function fieldPass( Name , MaxChar, LenIE, LenNN , Value, JS ) {
	if( bName!=-1 ){
		document.write("<input size="+LenIE+" name="+Name+" maxlength="+MaxChar+(Value==""?"":" value=\""+Value+"\"")+(JS==""?"":" "+JS)+" type=\"password\">" );
	}else{
		window.document.write("<input size="+LenNN+" name="+Name+" maxlength="+MaxChar+(Value==""?"":" value=\""+Value+"\"")+(JS==""?"":" "+JS)+" type=\"password\">" );
	}
}

//============================================================================
function fieldTextarea( Name , IECols, IERows , NNCols, NNRows , Wrap , defaultValue, JS ) {
//
//	WRAP : [ OFF | VIRTUAL | PHYSICAL ]
//
//	IECols / NNCols = 1.5
//
	var str;
	if( bName!=-1 ){
		str = "<textarea "+(Wrap==''?'':" wrap="+Wrap)+" name="+Name+" cols="+IECols+" rows="+IERows+(JS==""?"":" "+JS)+">"+defaultValue+"</textarea>" ;
	}else{
		str = "<textarea "+(Wrap==''?'':" wrap="+Wrap)+" name="+Name+" cols="+NNCols+" rows="+NNRows+(JS==""?"":" "+JS)+">"+defaultValue+"</textarea>" ;
	}
	document.write( str );
	//alert( 1 );
}
//============================================================================
function TextareaReadonly( Name , IECols, IERows , NNCols, NNRows , Wrap , defaultValue, Class) {
	if( bName!=-1 ){
		document.write("<textarea "+(Wrap==''?'':" wrap="+Wrap)+" name="+Name+" cols="+IECols+" rows="+IERows+(Class==""?"":" class="+Class)+" readonly>"+defaultValue+"</textarea>");
	}else{
		document.write("<textarea "+(Wrap==''?'':" wrap="+Wrap)+" name="+Name+" cols="+NNCols+" rows="+NNRows+(Class==""?"":" class="+Class)+" readonly>"+defaultValue+"</textarea>");
	}
}

/////////////////////////////////////////////////////////////////////////////////////////////////
function chkInt( obj ) {
	obj.value = obj.value.replace(/[\D ]/g,"");
	return true;
}

/////////////////////////////////////////////////////////////////////////////////////////////////
function chkFloat( obj ) {
	obj.value = obj.value.replace(/[^,.0-9]/g,"");
	obj.value = obj.value.replace(/\s/g,"");
	//obj.value = obj.value.replace(/ /g,"");
	obj.value = obj.value.replace(/,/g,".");
	if (obj.value=='')
	{
		obj.value='0';
	}
	if (obj.value.indexOf(".")!=-1)
	{
		obj.value += '001';
	}
	else
	{
		obj.value += '.001';
	}
	obj.value = obj.value.replace(/[.](\d+)[.].*/g,".$1");
	obj.value = obj.value.replace(/[.](\d\d)[\d]*/g,".$1");
	return true;
}

/////////////////////////////////////////////////////////////////////////////////////////////////
function chkDate( obj ) {
//	obj.value = obj.value.replace(/-/g,"/");
//	obj.value = obj.value.replace(/[^,/0-9]/g,"");
//	obj.value = obj.value.replace(/\s/g,"");
	reg=/\d\d-\d\d-\d\d\d\d/
	if (obj.value.search(reg)==-1)
	{
		alert("Дата должна быть в формате dd-mm-yyyy");
		obj.value="ДД-ММ-ГГГГ";
	}
//	return true;
}

/////////////////////////////////////////////////////////////////////////////////////////////////
function backHistory( site, par ) {
	if( navigator.appName.indexOf("Internet Explorer")==-1 ){		// те БРОУЗЕР не MS IExplorer
		if( navigator.appName.indexOf("Netscape")>=0 ){		// те БРОУЗЕР Netscape Navigator
			history.go( par );
		}
	}else{
		location=  site+par ;
	}
	//return true;
}

/////////////////////////////////////////////////////////////////////////////////////////////////
function descObject( URL ){
	var w=680; h=600; x=0; y=0;
	ww = this.open( URL , "winoffer", "status=yes,scrollbars=yes,resizable=yes,width="+w+",height="+h+",left="+x+",top="+y );
	ww.focus();
}

/////////////////////////////////////////////////////////////////////////////////////////////////
function openURL( strURL, x, y , w, h ){
	w=600;
	h=500;
	return window.open( strURL , "_blank", "toolbar=0,status=0,resizable=0,scrollbars=0,width="+w+",height="+h+",left="+x+",top="+y );
}


/////////////////////////////////////////////////////////////////////////////////////////////////
//Функция открывает увеличенную картинку
	function MM_openBrWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}

//Возвращает правду, если навигатор IE, ложь если Netscape
function isIE()
{
		if( navigator.appName.indexOf("Internet Explorer")==-1 )
		{		// те БРОУЗЕР не MS IExplorer
			if( navigator.appName.indexOf("Netscape")>=0 )
			{		// те БРОУЗЕР Netscape Navigator
			}
		}
		else
		{
			return true;
		}
}

////////////////////////////////////////////////////////////////
function promotion(){
	var v,obj,height ;
	if ((obj=MM_findObj('promotion'))!=null){ 
		if(bName!=-1){	height = document.body.offsetHeight; } 
			else{ height = window.innerHeight ; }
		//alert( height+"|"+window.pageYOffset);
		//alert( document.all.promotion.style.pixelTop=-10);

		if (obj.style){
			obj=obj.style;
			if( obj.visibility=='visible' ){
				v='hidden';
			}else{
				v='visible';
			}
		}else{
			if(obj.visibility=='show'){
				v='hide';
			}else{
				v='show';
			}
		}
		obj.visibility=v; 

	}
	//MM_showHideLayers('promotion','','show')
}
////////////////////////////////////////////////////
function wopen( url ) {
	window.open( url, '_self' );
}
////////////////////////////////////////////////////
function setColorBG( obj, myColor, newColor ) {
	obj.style.backgroundColor=myColor;
	obj.style.color=newColor;
}




////////////////////////////////////////////////////
//
//	Type in Status BAR 
//
//<!-- Begin
var Message="cRaCkZ uNLiMiTeD :: www.crackz.ws";
var place=1;
function scrollIn() {
	window.status=Message.substring(0, place);
	if (place >= Message.length) {
		place=1;
		window.setTimeout("scrollOut()",1000);
	}else{
		place++;window.setTimeout("scrollIn()",120);
	}
}

function scrollOut() { 
	window.status=Message.substring(place, Message.length);
	if (place >= Message.length) {
		place=1;
		window.setTimeout("scrollIn()", 100);
	} else {
		place++;
		window.setTimeout("scrollOut()", 50);
	}
}

function isCancel( obj )
{
	return confirm( 'Вы действительно хотите удалить?' ) ? true : false;
}

function openPhoto( path, alt, w, h, titl ) 
{
	var wo = window.open( '', '_photo', 'width=' + w + ', height=' + h + ',scrollbars=0, menubar=0, titlebar=0, status=0, directories=0, resizable=0' );
	wo.document.write('<html>');
	wo.document.write('<head>');
	wo.document.write('<title>' + titl + '</title>');
	wo.document.write('</head>');
	wo.document.write('<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0 bgcolor="#FFFFFF">');
	wo.document.write('<img src= ' + path + ' border="0" vspace="0" hspcae="0" alt="' + alt +'" title="' + alt +'" OnClick="window.close();">');
	wo.document.write('</body>');
	wo.document.write('</html>');
	wo.focus();
	return false;
}


function onLoadFocus ( the_form, the_object )
{
	f = document.forms[the_form];

	if ( typeof f != 'undefined' )
	{
		obj = f.elements[the_object];
		if ( typeof obj != 'undefined' || obj.type != 'hidden' )
		{
			obj.focus();
		}
	}
}

// End -->
//	This is insert into page 
//scrollOut();
function _prn_flash()
{
        //
        document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
        document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"');
        document.write(' WIDTH="200" HEIGHT="65" ALIGN="">');
        document.write(' <PARAM NAME=movie VALUE="../swf/sanesta_flash.swf">'); 
        document.write(' <PARAM NAME=quality VALUE=high>') ;
        document.write('        <EMBED src=""../swf/sanesta_flash.swf"" quality=high ');
        document.write('                swLiveConnect=FALSE ');
        document.write('                 width="200" height="65" hspace="10"');
        document.write('                TYPE="application/x-shockwave-flash" ');
        document.write('PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" >') ;
        document.write('                </EMBED>');
        document.write('</OBJECT>');
        return true ;
}

function fl_or_gif()
{
    var MM_contentVersion = 6;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
					var words = navigator.plugins["Shockwave Flash"].description.split(" ");
				for (var i = 0; i < words.length; ++i)
				{
					if (isNaN(parseInt(words[i]))) continue;
					var MM_PluginVersion = words[i]; 
				}
			var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}
    else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) 
    {
        document.write('<SCR'+'IPT LANGUAGE=VBScript\> \n'); 
        document.write('on error resume next \n');
        document.write('MM_FlashCanPlay = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
        document.write('</SCR'+'IPT\>\n');
    }
	if ( MM_FlashCanPlay ) 
    {
        if (navigator.userAgent.indexOf("MSIE")>=0 && navigator.userAgent.indexOf("Opera")<0)
            { 
                _prn_flash() ;
            }
            else
            {
                if (navigator.userAgent.indexOf("MSIE")>=0 &&navigator.userAgent.indexOf("Opera")<0)
                { 
                    document.write('<IMG SRC="../img/sanesta_flash.gif" WIDTH="200" HEIGHT="65" BORDER=0>');
                }
                else
                    if (navigator.userAgent.indexOf("MSIE")<0 && navigator.userAgent.indexOf("Opera")>=0)
                    { 
                        _prn_flash() ;
                    }
                    else
                    {  // Not MSIE or Opera
                        _prn_flash() ;
                    }
            }
    }
    else
    {
        document.write('<IMG SRC="../img/sanesta_flash.gif" WIDTH="200" HEIGHT="65"	BORDER=0>');
    }
}
function WinHref(to)
{
	window.location.href = to;
}

function isSave(form)
{
/*	if ( ! the_form )
	{
		alert(' f ');
		return false;
	}*/

	f = document.forms['f1'];

	if ( typeof f == 'undefined' )
	{
		alert('   f');
		return false;
	}

	if (confirm( 'Сохранить изменения?' ) ? true : false)
		f.submit();
	return true;
}

function CheckImgForm(form)
{
	if (form.file.value == '')
	{
		alert ('Файл не выбран!');
		return false;
	}
	return true;
}

/**
 * This array is used to remember mark status of rows in browse mode
 */
var marked_row = new Array;


/**
 * Sets/unsets the pointer and marker in browse mode
 *
 * @param   object    the table row
 * @param   interger  the row number
 * @param   string    the action calling this script (over, out or click)
 * @param   string    the default background color
 * @param   string    the color to use for mouseover
 * @param   string    the color to use for marking a row
 *
 * @return  boolean  whether pointer is set or not
 */
function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor)
{
    var theCells = null;

    // 1. Pointer and mark feature are disabled or the browser can't get the
    //    row -> exits
    if ((thePointerColor == '' && theMarkColor == '')
        || typeof(theRow.style) == 'undefined') {
        return false;
    }

    // 2. Gets the current row and exits if the browser can't get it
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    // 3. Gets the current color...
    var rowCellsCnt  = theCells.length;
    var domDetect    = null;
    var currentColor = null;
    var newColor     = null;
    // 3.1 ... with DOM compatible browsers except Opera that does not return
    //         valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        domDetect    = true;
    }
    // 3.2 ... with other browsers
    else {
        currentColor = theCells[0].style.backgroundColor;
        domDetect    = false;
    } // end 3

    // 4. Defines the new color
    // 4.1 Current color is the default one
    if (currentColor == ''
        || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
        if (theAction == 'over' && thePointerColor != '') {
            newColor              = thePointerColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
            marked_row[theRowNum] = true;
        }
    }
    // 4.1.2 Current color is the pointer one
    else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()
             && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) {
        if (theAction == 'out') {
            newColor              = theDefaultColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
            marked_row[theRowNum] = true;
        }
    }
    // 4.1.3 Current color is the marker one
    else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {
        if (theAction == 'click') {
            newColor              = (thePointerColor != '')
                                  ? thePointerColor
                                  : theDefaultColor;
            marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])
                                  ? true
                                  : null;
        }
    } // end 4

    // 5. Sets the new color...
    if (newColor) {
		var aColor='#FFFFFF';
		var dColor='#000000';
        var c = null;
        // 5.1 ... with DOM compatible browsers except Opera
        if (domDetect) {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].setAttribute('bgcolor', newColor, 0);
				if (theAction == 'click')
				{
					if (thePointerColor == newColor)
					{
						theCells[c].style.color=dColor;
					}
					else 
					{
						theCells[c].style.color=aColor;
					}
				}
            } // end for
        }
        // 5.2 ... with other browsers
        else {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].style.backgroundColor = newColor;
				if (theAction == 'click')
				{
					if (thePointerColor == newColor)
					{
						theCells[c].style.color=dColor;
					}
					else 
					{
						theCells[c].style.color=aColor;
					}
				}
            }
        }
    } // end 5

    return true;
} // end of the 'setPointer()' function

/////////////////////////////////////////////////////////////////////////////////////////////////	

//Функция открывает увеличенную картинку
	function MM_openBrWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}

	function Terms(file)
	{
		if (file == '')
		{
			return false;
		}
		window.open( '/Terms.php?file='+file, 'Terms', 'width=400, height=400,scrollbars=0, menubar=0, titlebar=0, status=0, directories=0, resizable=0' );
	}
