// JavaScript Document
function openWnd(src, width, height, title) {
//var title += ' - обложка пластинки';
var left= (screen.width / 2) - (width / 2);
var top = (screen.height / 2) - (height / 2);
  wnd = window.open("", "imageWindow",
    "left=" + left + ",top=" + top + ",width=" + width + ",height=" + height);
  var doc = wnd.document;
  doc.open();
  doc.write('<html><head><title>' + title + '</title></head>' +
            '<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">' +
            '<img src="' + src + '" width="' + width + '" height="' + height +
            '" vspace="0" hspace="0" alt="' + title + '">' +
            '<br></body></html>'
            );
  doc.close();
  wnd.focus();
  return false;
}


function newImage(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}

function changeImages() {
  if (document.images && (1)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
  }
}

var preloadFlag = false;
function preloadImages() {
  if (document.images) {
    index_1_on = newImage("images/index_1_on.gif");
    index_2_on = newImage("images/index_2_on.gif");
    index_3_on = newImage("images/index_3_on.gif");
    //img_3-1_on
    //2_on = newImage("images/2_on.gif");

    preloadFlag = true;
  }
}


function winop(){
var windop=window.open("","OK","left=" + (screen.width / 2-300 / 2) + ",top=" + (screen.height / 2-120 / 2) + ",width=300,height=120");
windop.document.open();
windop.document.write("<html><head><title>РФП</TITLE>");
windop.document.write("<script> function href(){setTimeout(\"time_()\", 2000);} function time_(page){window.close(); return true;}</script>");
windop.document.write("<link rel=\"STYLESHEET\" type=\"text/css\" href=\"css/style.css\"></head><body onLoad=href(); bgcolor=#ffffff>");
windop.document.write("<center><b><br><div style=font-family:Verdana;font-size:11px;color:#535251;>Спасибо, ваше сообщение отправлено!</div></b></center>");
windop.document.write("<center><form><input type='button' class=\"btn\" value='Закрыть' onClick='window.close()'></form></center>");
windop.document.write("</body></html>");
windop.document.close();
}

function winop2(){
var windop=window.open("","OK","left=" + (screen.width / 2-300 / 2) + ",top=" + (screen.height / 2-120 / 2) + ",width=300,height=120");
windop.document.open();
windop.document.write("<html><head><title>РФП</TITLE>");
windop.document.write("<script> function href(){setTimeout(\"time_()\", 2000);} function time_(page){window.close(); return true;}</script>");
windop.document.write("<link rel=\"STYLESHEET\" type=\"text/css\" href=\"css/style.css\"></head><body onLoad=\"href();\" bgcolor=#ffffff>");
windop.document.write("<center><b><br><div style=font-family:Verdana;font-size:11px;color:#535251;>Спасибо, ваш заказ отправлен!</div></b></center>");
windop.document.write("<center><form><input type='button' class=\"btn\" value='Закрыть' onClick='window.close()'></form></center>");
windop.document.write("</body></html>");
windop.document.close();
}

function href(){
setTimeout("time_()", 2000);
}


function time_(page){
// location.href=page;
window.close();
 return true;
}

function CurrentDate()
{
Now = new Date();
theMonth = Now.getMonth();
if (theMonth == "0") {theMonth = " января "}
else if (theMonth == "1") {theMonth = " февраля "}
else if (theMonth == "2") {theMonth = " марта "}
else if (theMonth == "3") {theMonth = " апреля "}
else if (theMonth == "4") {theMonth = " мая "}
else if (theMonth == "5") {theMonth = " июня "}
else if (theMonth == "6") {theMonth = " июля "}
else if (theMonth == "7") {theMonth = " августа "}
else if (theMonth == "8") {theMonth = " сентября "}
else if (theMonth == "9") {theMonth = " октября "}
else if (theMonth == "10") {theMonth = " ноября "}
else if (theMonth == "11") {theMonth = " декабря "}

document.write(Now.getDate() + theMonth + Now.getFullYear() + ' года');
}

//function save(){
//window.external.AddFavorite('http://rfp.utexpro.ru/','Проектирование и изготовление технологической оснастки');
//return true;
//}
