var windows = new Array();
var w=0;
var dat=new Date();
var datd="confidential";
var ndat = "";
var smft="foto_small";

function fullscr(a) {
window[w] = window.open("","","toolbar=0,scrollbar=1, top=10, left=100, width=850, height=550");
window[w].document.write("<head><title>Просмотр фотки</title></head>");
window[w].document.write("<SCRIPT language=JavaScript>var message=''; function clickIE() {if (document.all) {(message);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}</SCRIPT>");
window[w].document.write("<BODY bgColor=#050807 onselectstart='javascript: return false;' onmouseover=\"window.status=' ';return true\";>");
window[w].document.write("<center><a href='' title='Просмотр фотки'><IMG src=foto_" + a + ".jpg  border=0></a></center></body></html>");
}
function fullscrIgr(a) {
window[w] = window.open("","","toolbar=0,scrollbar=1, top=10, left=100, width=850, height=550");
window[w].document.write("<head><title>Просмотр фотки</title></head>");
window[w].document.write("<SCRIPT language=JavaScript>var message=''; function clickIE() {if (document.all) {(message);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}</SCRIPT>");
window[w].document.write("<BODY bgColor=#050807 onselectstart='javascript: return false;' onmouseover=\"window.status=' ';return true\";>");
window[w].document.write("<center><a href='' title='Просмотр фотки'><IMG src=foto_igr_big_" + a + ".jpg  border=0></a></center></body></html>");
}

function addCookieReferer(){
var nameSite = "atronic.net.ru";
var expdate = new Date();
var visit;
expdate.setTime(expdate.getTime() +  (5 * 60 * 1000));
var refer = GetCookie("refer");
var s = document.referrer;
if (refer == null){
if (s != ""){
SetCookie("refer", s, null, "/", null, false);
}
}
}

function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0)
break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (2 < argc) ? argv[2] : null;
var path = (3 < argc) ? argv[3] : null;
var domain = (4 < argc) ? argv[4] : null;
var secure = (5 < argc) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}

function confidentialPage(){
var expdate = new Date();
expdate.setTime(expdate.getTime() +  (60 * 60 * 1000));
var confUser = GetCookie("user");
if (confUser != "yes"){self.location.href="error.html";}
}

function itemFocus() {
eId = window.event.srcElement.id;
document.all[eId].style.border="#000000 1px solid";
document.all[eId].style.color="#0000ff";
document.all[eId].style.background="#f0f0ff";
}

function itemBlur() {
eId = window.event.srcElement.id;
document.all[eId].style.border="#2222ff 1px solid";
document.all[eId].style.color="#000";
document.all[eId].style.background="#e0e0f0";
}

startColor = "#2222dd";
endColor = "#dd2222";
stepIn = 20; // delay when fading in
stepOut = 15; // delay when fading out
autoFade = true;
sloppyClass = false;

hexa = new makearray(16);
for(var i = 0; i < 10; i++)
    hexa[i] = i;
hexa[10]="a"; hexa[11]="b"; hexa[12]="c";
hexa[13]="d"; hexa[14]="e"; hexa[15]="f";

document.onmouseover = domouseover;
document.onmouseout = domouseout;

startColor = dehexize(startColor.toLowerCase());
endColor = dehexize(endColor.toLowerCase());

var fadeId = new Array();

function dehexize(Color){
var colorArr = new makearray(3);
for (i=1; i<7; i++){
for (j=0; j<16; j++){
if (Color.charAt(i) == hexa[j]){
if (i%2 !=0)
colorArr[Math.floor((i-1)/2)]=eval(j)*16;
else
colorArr[Math.floor((i-1)/2)]+=eval(j);
}
}
}
return colorArr;
}

function domouseover() {
if(document.all){
var srcElement = event.srcElement;
if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1))
fade(startColor,endColor,srcElement.uniqueID,stepIn);
}
}

function domouseout() {
if (document.all){
var srcElement = event.srcElement;
if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "fade" || (sloppyClass && srcElement.className.indexOf("fade") != -1))
fade(endColor,startColor,srcElement.uniqueID,stepOut);
}
}

function makearray(n) {
this.length = n;
for(var i = 1; i <= n; i++)
this[i] = 0;
return this;
}

function hex(i) {
if (i < 0)
return "00";
else if (i > 255)
return "ff";
else
return "" + hexa[Math.floor(i/16)] + hexa[i%16];}
function setColor(r, g, b, element) {
var hr = hex(r); var hg = hex(g); var hb = hex(b);
element.style.color = "#"+hr+hg+hb;
}

function fade(s,e, element,step){
var sr = s[0]; var sg = s[1]; var sb = s[2];
var er = e[0]; var eg = e[1]; var eb = e[2];
if (fadeId[0] != null && fade[0] != element){
setColor(sr,sg,sb,eval(fadeId[0]));
var i = 1;
while(i < fadeId.length){
clearTimeout(fadeId[i]);
i++;
}
}
for(var i = 0; i <= step; i++) {
fadeId[i+1] = setTimeout("setColor(Math.floor(" +sr+ " *(( " +step+ " - " +i+ " )/ " +step+ " ) + " +er+ " * (" +i+ "/" +
step+ ")),Math.floor(" +sg+ " * (( " +step+ " - " +i+ " )/ " +step+ " ) + " +eg+ " * (" +i+ "/" +step+
")),Math.floor(" +sb+ " * ((" +step+ "-" +i+ ")/" +step+ ") + " +eb+ " * (" +i+ "/" +step+ ")),"+element+");",i*step);
}
fadeId[0] = element;
}

function sendIt(zacaz){
SetCookie("zacaz", zacaz, null, "/", null, false);
self.location.href="./secret_page_order.html";
}



nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  //do this so I can take a string too
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }

    clearTimeout(nereidFadeTimers[object.sourceIndex]);

    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}
var FadeInterval = 300;
var StartFadeAt = 6;

var FadeSteps = [];
FadeSteps[FadeSteps.length] = "d6ef4a";
FadeSteps[FadeSteps.length] = "d8e040";
FadeSteps[FadeSteps.length] = "e0d040";
FadeSteps[FadeSteps.length] = "e8c040";
FadeSteps[FadeSteps.length] = "f0b040";
FadeSteps[FadeSteps.length] = "f8a040";
FadeSteps[FadeSteps.length] = "ff9040";


function DoFade(colorId, targetId) {
    if (colorId >= 0) {
        document.getElementById(targetId).style.backgroundColor = "#" + FadeSteps[colorId];
        if (colorId == 0) {
            document.getElementById(targetId).style.backgroundColor = "transparent";
        }
        colorId--;
        setTimeout("DoFade("+colorId+",'"+targetId+"')", FadeInterval);
    }
}


