months = new Array ("января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря");

months2 = new Array ("01","02","03","04","05","06","07","08","09","10","11","12");

function ShowDate()

{

var now = new Date();

var s = now.getDate() + " " + months[now.getMonth()] + " " +  "2012";

document.write(s);

}

function ShowDate2()

{

var now = new Date();

var s = (15) + "." + "06" + "." +  "2011";

document.write(s);

}

function ShowDate3()

{

var now = new Date();

var s = (18) + "." + "01" + "." +  "2012";

document.write(s);

}







var MAX=1;

var img=new MakeArray(MAX);

opera  = (navigator.userAgent.indexOf('Opera') >= 0)? true : false;

ie    = (document.all && !opera)? true : false;

dom    = (document.getElementById && !ie && !opera)? true : false;

ie4    = (!dom && ie) ? true : false;

nn4    = (document.layers)? true : false;

function MakeArray(n){for(var i=0;i<n;i++){this['i'+i]=0;}this.maxlen=n;this.len=0;return this;}

function Images(org,swap){if(document.images){this.org=new Image();this.org.src=org;this.swap=new Image();this.swap.src=swap;}}

function Add(name,id,hint){  img[id]=new Images(name+"_01.gif",name+"_02.gif")}

function Add2(name,id,hint){  img[id]=new Images(name+"_01.jpg",name+"_02.jpg")}

function enter(id){if(document.images){document.images[id].src=img[id].swap.src;}}

function out(id){if (document.images){document.images[id].src=img[id].org.src;}}

function findObj(theObj, theDoc){

  var p, i, foundObj;

  if(!theDoc) theDoc = document;

  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length){

    theDoc = parent.frames[theObj.substring(p+1)].document;

    theObj = theObj.substring(0,p);

  }

  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];

  for (i=0; !foundObj && i < theDoc.forms.length; i++)

    foundObj = theDoc.forms[i][theObj];

  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)

    foundObj = findObj(theObj,theDoc.layers[i].document);

  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);

  return foundObj;

}

function browseURL(url, money, balance){

  var width="270", height="120";

  var left = (screen.width/2) - width/2;

  var top = (screen.height/2) - height/2;

  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;

  var msgWindow = window.open("/login/show_docprice.asp?url=" + encodeURI(url) + "&price=" + money,"msgWindow", styleStr);

}



function openInWin(url){

  var width="400", height="500";

  var left = (screen.width/2) - width/2;

  var top = (screen.height/2) - height/2;

  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;

  var msgWindow = window.open(url, "WindowList", styleStr);

}
