function newWin(link,width,height,tittle)
{
	win = open ('','_blank','menubar=0,resizable=0,scrollbars=0,toolbar=0,status=0,width='+width+',height='+height+'' );
	win.document.writeln('<HTML><HEAD><TITLE>'+tittle+'</TITLE></HEAD><BODY leftmargin="0" topmargin="0" bgcolor="white" marginwidth="0" marginheight="0"><IMG src="'+link+'" border="0"></BODY></HTML>');
}
function newtWin(width,height,tittle,txt)
{
	win = open ('','_blank','menubar=0,resizable=0,scrollbars=0,toolbar=0,status=0,width='+width+',height='+height+'' );
	win.document.writeln('<HTML><HEAD><TITLE>'+tittle+'</TITLE><link rel="stylesheet" href="styles.css"></HEAD><BODY leftmargin="0" topmargin="0" bgcolor="white" marginwidth="0" marginheight="0"><p align="JUSTIFY">'+txt+'</p></BODY></HTML>');
}


function Filtr(link,width,height,s)
{
	win = open (link,'_blank','menubar=0,resizable=0,scrollbars='+s+',toolbar=0,status=0,width='+width+',height='+height+',left=50,top=50');

}
function REG(link)
{
	
	win = open (link,'_top');
}
function flashShow(txt,prod,w,h,h1)
{
	w1 = w+0;
	al = '';
	scr='0';
	if (h1>580)
	{
		h1=h;
		w1=w1+185;
		if (w1>780)
		{
			w1=780;
			h1=580;
		}
		al = " align='left'";
	}	
	if (h1==0)
	{
		h1=580;
		scr='1';	
	}
	
//		alrt('dd');
	win = open ('fl.htm','_blank','menubar=0,resizable=0,scrollbars='+scr+',toolbar=0,status=0,width='+w1+',height='+h1+'');
	win.document.writeln('<HTML><HEAD><TITLE>'+txt+'</TITLE></HEAD><BODY bgcolor="white"  leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">');
			win.document.writeln("<OBJECT CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' NAME='FLASH11' CODEBASE='http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0' WIDTH='"+w+"' HEIGHT='"+h+"' BORDER='0' HSPACE='0' VSPACE='0'"+al+"><PARAM NAME='MOVIE' VALUE='http://www.rsz.ru/FL/"+prod+"'><PARAM NAME='LOOP' VALUE='TRUE'><PARAM NAME='MENU' VALUE='FALSE'><PARAM NAME='QUALITY' VALUE='high'><PARAM NAME='BGCOLOR' VALUE='white'></OBJECT>");
		win.document.writeln('</BODY></HTML>');
}
function MM_checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL) { //v2.0
  var newURL = '', version = parseFloat(navigator.appVersion);
  if (navigator.appName.indexOf('Netscape') != -1) {
    if (version >= NSvers) {if (NSpass>0) newURL = (NSpass==1)?URL:altURL;}
    else {if (NSnoPass>0) newURL = (NSnoPass==1)?URL:altURL;}
  } else if (navigator.appName.indexOf('Microsoft') != -1) {
    if (version >= IEvers) {if (IEpass>0) newURL = (IEpass==1)?URL:altURL;}
    else {if (IEnoPass>0) newURL = (IEnoPass==1)?URL:altURL;}
  } else if (OBpass>0) newURL = (OBpass==1)?URL:altURL;
  if (newURL) {
    window.location = unescape(newURL);
    document.MM_returnValue = false;
  }
}

function MM_showHideLayers() { //v2.0
  var i, visStr, args, theObj;
  args = MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)
    visStr   = args[i+2];
    if (navigator.appName == 'Netscape' && document.layers != null) {
      theObj = eval(args[i]);
      if (theObj) theObj.visibility = visStr;
    } else if (document.all != null) { //IE
      if (visStr == 'show') visStr = 'visible'; //convert vals
      if (visStr == 'hide') visStr = 'hidden';
      theObj = eval(args[i+1]);
      if (theObj) theObj.style.visibility = visStr;
  } }
}

function scrShow(txt,goods,w,h)
{
	win = open ('','_blank','menubar=1,resizable=1,scrollbars=1,toolbar=1,status=1,width='+w+',height='+h+'');
	win.document.writeln('<HTML><HEAD><TITLE>'+txt+'</TITLE></HEAD><BODY background="big_image.htm?id_goods='+goods+'></BODY></HTML>');
}

function  z_showHideLayers(theName,visStr) { 
var visStr, theName;
    	if (document.getElementById && navigator.appName == 'Netscape')
	{
        	if (visStr == 'show') visStr = 'visible'; 
        	if (visStr == 'hide') visStr = 'hidden';
        	document.getElementById(theName).style.visibility=visStr;
        	}
               	if ((navigator.appName == 'Netscape') && (document.layers)) 
       	{
       	document.layers[theName].visibility=visStr;
      	} 
       	if (document.all) {
        	if (visStr == 'show') visStr = 'visible';
        	if (visStr == 'hide') visStr = 'hidden';
        	document.all[theName].style.visibility=visStr;
                }
}


function setPointer(theRow, thePointerColor, theNormalBgColor,theDiv,theAct)
{
    var theCells = null;

    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    var currentColor = null;
    var newColor     = null;
    // Opera does not return valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
        for (var c = 0; c < rowCellsCnt; c++) {
            theCells[c].setAttribute('bgcolor', newColor, 0);
        } // end for
    }
    else {
        currentColor = theCells[0].style.backgroundColor;
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
        for (var c = 0; c < rowCellsCnt; c++) {
            theCells[c].style.backgroundColor = newColor;
        }
    }

    if  (theAct == 'hide'||theAct == 'show') {
	z_showHideLayers(theDiv,theAct);
	}
    return true;
} // end of the 'setPointer()' function

function setPointerTD(theTD, thePointerColor, theNormalBgColor,theDiv,theAct)
{ 
    
    var theCells = null;

    if (thePointerColor == '' || typeof(theTD.style) == 'undefined') {
        return false;
    }
   

   
    var currentColor = null;
    var newColor     = null;
    // Opera does not return valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theTD.getAttribute) != 'undefined' && typeof(theTD.getAttribute) != 'undefined') {
        currentColor = theTD.getAttribute('bgcolor');
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
        
            theTD.setAttribute('bgcolor', newColor, 0);
       
    }
    else {
        currentColor = theTD.style.backgroundColor;
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
        
            theTD.style.backgroundColor = newColor;
      
    }

    if  (theAct == 'hide'||theAct == 'show') {
	z_showHideLayers(theDiv,theAct);
	}
    return true;
} // end of the 'setPointer()' function


function set_div_color (theName, thePointerColor, theNormalBgColor,theDiv,theAct)
{ 
if (document.getElementById && navigator.appName == 'Netscape')
	{
    theTD=document.getElementById(theName); }
	
		if (document.all) {

        	theTD=document.all[theName];
                }
  //alert(theTD);

    if (thePointerColor == '' || typeof(theTD.style) == 'undefined') {
		
        return false;
    }
   

  
    var currentColor = null;
    var newColor     = null;
	
	
    // Opera does not return valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theTD.getAttribute) != 'undefined' && typeof(theTD.getAttribute) != 'undefined') {
		
			 theTD.style.backgroundColor=thePointerColor; 
   
    }
    else {
		
        currentColor = theTD.style.backgroundColor;
//alert('44');
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
        
            theTD.style.backgroundColor = newColor;
      
    }

  
    return true;
} // end of the 'setPointer()' function

function simplePreload()
{ 
  var args = simplePreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}
