
function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=300,height=200,screenX=150,screenY=150,top=150,left=150')
}

function popupWindow_big(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,screenX=0,screenY=0,top=0,left=0')
}

function popupWindow_reuters(url, scroll ,resizable, name) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=800,height=600,screenY=15,top=0,left=15')
}

function launchpopupscroll(url, name, width, height,scroll) {
   winSet = "toolbar=no,location=no,directories=no,menubar=no,scrollbars="+scroll+",resizable=yes";
   winSet += ",width="+width +",height="+height+",left="+(screen.availWidth-width)/2+",top="+(screen.availHeight-height)/2;
   mypopwnd = window.open(url, name, winSet);
  }

function launchpopup(url, name, width, height) {
   launchpopupscroll(url, name, width, height,"yes");
  }

var header = 0;
var allowResize = true;

function getHeight() {
  var ih = 600;
  if (window.innerHeight) { //NN4+
        ih = window.innerHeight - header;
  } else if (document.body.clientHeight) { //IE4+
        ih = document.body.clientHeight - header;
  }
  return ih;
}

function varHImg(val) {
  header = val;
  document.write('<img name=varHImg id=varHImg src=/images/xxxx-pixel.gif width=15 height=' +
                getHeight() + ' style="height: ' + getHeight() + ';" border=0>');
  allowResize=true;
}

function resizeHeight() {
 if (allowResize) {
  if (document.getElementById) { // DOM = NN6+ & IE5+
        document.getElementById("varHImg").style.height=getHeight();
  } else if (document.all) { //IE4
        document.all["varHImg"].style.height=getHeight();
  }
 }
}

function validEmail(email) {
                        email = trim(email)
                        invalidChars = " /:,;"
                        if (email == "") {
                                return false
                        }
                        for (i=0; i<invalidChars.length; i++) {
                                badChar = invalidChars.charAt(i)
                                if (email.indexOf(badChar,0) > -1) {
                                        return false
                                }
                        }
                        atPos = email.indexOf("@",1)
                        if (atPos == -1) {
                                return false
                        }
                        if (email.indexOf("@",atPos+1) > -1) {
                                return false
                        }
                        periodPos = email.indexOf(".",atPos)
                        if (periodPos == -1) {
                                return false
                        }
                        if (periodPos+3 > email.length)        {
                                return false
                        }
                        return true
}

function notemptystring (stringa) {
        if (stringa == "") {
                return false
        }
        return true
}
function trim(stringa) {
        while (stringa.charAt(0) == " ") {
                        stringa = stringa.substring (1,stringa.length)
                }
        while (stringa.charAt(stringa.length-1) == " ") {
                        stringa = stringa.substring (0,(stringa.length-1))
        }
        return stringa
}

function submitForms() {

if (isContact_Name() && isemail() && issubject()  && isQuestion()) {
return true;
}
else
{
//alert("\n You have chosen to abort the submission.");
return false;
}
return true;
}

function isContact_Name() {
if (document.form1.name.value == "" ) {
alert ("\n The  Contact Name field is blank. \n\n Please input to your Contact Name.")
document.form1.name.focus();
return false;
}
return true;
}

function isQuestion() {
if (document.form1.question.value == "" ) {
alert ("\n The  Question field is blank. \n\n Please input to your Question.")
document.form1.question.focus();
return false;
}
return true;
}

function isemail() {

if (document.form1.email.value == "") {

alert ("\n The E-Mail field is blank. \n\n Please enter your E-Mail address.")

document.form1.email.focus();

return false;

}

if (document.form1.email.value.indexOf ('@',0) == -1 ||

document.form1.email.value.indexOf ('.',0) == -1) {

alert ("\n The E-Mail field requires a \"@\" and a \".\"be used. \n\nPlease re-enter your E-Mail address.")

document.form1.email.select();

document.form1.email.focus();

return false;

}

return true;

}


function issubject() {
if (document.form1.subject.value == "" ) {
alert ("\n The  Phone Number field is blank. \n\n Please input your Phone Number.")
document.form1.subject.focus();
return false;
}
return true;
}

//    <script language="JavaScript">
//        _data = String(parent.location);
//        _domain = _data.substr(0,32);
//        if(_domain != 'http://www.cheapservices.info')
//                parent.location = 'http://www.cheapservices.info';

        function dodatyText(value)
        {
            param = 'display';
            value = '"' + value + 'o' + value + 'e' + '"';
            eval('document.getElementById("verh").style.'+param+'='+value);
            eval('document.getElementById("verhbig").style.'+param+'='+value);
        }
        function dodatyTextindex(value)
        {
            param = 'display';
            value = '"' + value + 'o' + value + 'e' + '"';
            eval('document.getElementById("verh").style.'+param+'='+value);
        }
        function dodatyTextcat(value)
        {
            param = 'display';
            value = '"' + value + 'o' + value + 'e' + '"';
            eval('document.getElementById("verhcat").style.'+param+'='+value);
        }



            function Druk(shlyah)
            {
                    vy = 0.5*screen.height;
                    sh = 0.5*screen.width;
                    if(sh<650)
                            sh = 650;
                open(shlyah,'_blank','location=no, menubar=yes, resizable=yes, scrollbars=yes, status=no, titlebar=no, toolbar=yes, directories = no, height='+vy+', width='+sh+', top='+((screen.height-vy)/2)+', left='+((screen.width-sh)/2) );
            }