/* Blocks expand/collapse */
function blockChange(elem) {
elem = elem.parentNode;
if( elem.className.indexOf('expanded') == -1 ) {
elem.className = elem.className.replace('collapsed', 'expanded');
} else {
elem.className = elem.className.replace('expanded', 'collapsed');
}
}
function checkForm(form) {
if((form.fio.value == "")||(form.phone.value == "")||(form.email.value == "")) {
alert('Не заполнены обязательные поля!');
return false;
} else {
if(isEmail(form.email.value)) {
document.getElementById('fillform').style.display = 'none';
document.getElementById('sentform').style.display = 'block';
return true;
} else {
alert('Некорректный адрес!');
return false;
}
}
}
function popupItem(url) {
window.open(
url,
'_blank',
'toolbar=0,location=0,statusbar=0,menubar=0,width=500,height=550,left=20,top=20,scrollbars=yes'
);
}
function checkFeedback(form) {
if(form.question) {
if((form.name.value == "")||(form.question.value == "")||(form.email.value == "")) {
alert('Не заполнены обязательные поля!');
return false;
} else {
if(isEmail(form.email.value)) {
document.getElementById('fillform').style.display = 'none';
document.getElementById('sentform').style.display = 'block';
return true;
} else {
alert('Некорректный адрес!');
return false;
}
}
} else {
if((form.name.value == "")||(form.comment.value == "")||(form.email.value == "")) {
alert('Не заполнены обязательные поля!');
return false;
} else {
if(isEmail(form.email.value)) {
document.getElementById('fillform').style.display = 'none';
document.getElementById('sentform').style.display = 'block';
return true;
} else {
alert('Некорректный адрес!');
return false;
}
}
}
}
function checkFeedback2(form) {
if(form.text) {
if((form.fio.value == "")||(form.text.value == "")||(form.email.value == "")) {
alert('Не заполнены обязательные поля!');
return false;
} else {
if(isEmail(form.email.value)) {
// document.getElementById('fillform').style.display = 'none';
// document.getElementById('sentform').style.display = 'block';
return true;
} else {
alert('Некорректный адрес!');
return false;
}
}
} else {
if((form.fio.value == "")||(form.text.value == "")||(form.email.value == "")) {
alert('Не заполнены обязательные поля!');
return false;
} else {
if(isEmail(form.email.value)) {
// document.getElementById('fillform').style.display = 'none';
// document.getElementById('sentform').style.display = 'block';
return true;
} else {
alert('Некорректный адрес!');
return false;
}
}
}
}
function calculate(form) {
var result = (form.square.value * form.factor.value)/10;
document.getElementById("result").innerHTML = "Рекомендуемая мощность прибора не менее "+result+" кВт";
}
function checkCheckboxes(form) {
var minimum_activated = 2;
var total_activated = 0;
var checkboxes = new Array;
j=0;
for (var i=0; i
self.screen.width)
{
winwidth=self.screen.width-20;
pos+=",left=0";
}
else
{
winwidth=width;
pos+=",left="+((self.screen.width-width+17)/2);
}
if(height>self.screen.height)
{
winheight=self.screen.height+60;
pos+=",top=0";
}
else
{
winheight=height;
pos+=",top="+((self.screen.height-height)/2);
}
}
var params='toolbar=no,height='+winheight+',width='+winwidth+',location=no,scrollbars=no,status=no,menubar=no,resizable=yes'+pos;
picwin=window.open("","_blank",params);
picwin.document.open();
picwin.document.write('Конгресс-Отель DON-PLAZA ');
picwin.document.write('');
picwin.document.close();
}
*/
function ShowImageWindow(picname, width, height, title)
{
if(self && self.screen && self.screen.width)
{
pos="";
if(width>self.screen.width)
{
winwidth=self.screen.width-20;
pos+=",left=0";
}
else
{
winwidth=width+40;
pos+=",left="+((self.screen.width-width+17)/2);
}
if(height>self.screen.height)
{
winheight=self.screen.height+60;
pos+=",top=0";
}
else
{
winheight=height;
winheight+=65;
pos+=",top="+((self.screen.height-height)/2);
}
}
var params='toolbar=no, height='+winheight+',width='+winwidth+', location=no,scrollbars=no,status=no,menubar=no,resizable=yes'+pos;
picwin=window.open("","_blank",params);
picwin.document.open();
picwin.document.write('Конгресс-Отель DON-PLAZA ');
picwin.document.write('');
picwin.document.close();
}
function ShowImageWindowNew(picname, width, height, title)
{
if(self && self.screen && self.screen.width)
{
pos="";
if(width>self.screen.width)
{
winwidth=self.screen.width-20;
pos+=",left=0";
}
else
{
winwidth=width+40;
pos+=",left="+((self.screen.width-width+17)/2);
}
if(height>self.screen.height)
{
winheight=self.screen.height+60;
pos+=",top=0";
}
else
{
winheight=height;
winheight+=65;
pos+=",top="+((self.screen.height-height)/2);
}
}
var params='toolbar=no, height='+winheight+',width='+winwidth+', location=no,scrollbars=no,status=no,menubar=no,resizable=yes'+pos;
picwin=window.open("","_blank",params);
picwin.document.open();
picwin.document.write('Конгресс-Отель DON-PLAZA ');
picwin.document.write('');
picwin.document.close();
}