/* author: designer */
/* Creation date: 08.3.2005 ã. */
//--------------------------------- Currency rates and Weather information------------------------------------------------------

var dollar = "1.61706";
var pound = "2.94287";
var frank = "1.258740";

var d="d";
var p="u";
var f="d";

var allobj="667";

var sofia = " -10°C/ -1°C";
var varna = "-9°C/ 0°C";
var sofia_icon =2;
var varna_icon = 2;


//-----------------------------------------------------------------------------------------------------------







function load(directory){
curTime()
    if(document.images){
        names=load.arguments
        pictures=new Array;
        for (z=1;z<names.length;z++){
            pictures[z]=new Image;
            pictures[z].src=directory+names[z];
        }
    }    
}
function replace1(image){

document.home.src = image;
}
function replace2(image){

document.search.src = image;
}
function replace3(image){

document.contact.src = image;
}
function replace4(image){

document.forum.src = image;
}
function replace5(image){

document.news.src = image;
}
function replace6(image){

document.offers.src = image;
}
function openWindowru(price)
{
	var price;
  calcwindow=window.open('./calcr.php?c3='+price+'','calc','width=300,height=150,toolbar=0,menubar=0,scrollbars=0,status=0,resizable=0,screenx=225,screeny=230');
}
function openWindow(price)
{
var price;
  calcwindow=window.open('./calc.php?c3='+price+'','calc','width=300,height=150,toolbar=0,menubar=0,scrollbars=0,status=0,resizable=0,screenx=225,screeny=230');
}
function openWindownew()
{

  calcwindow=window.open('indexr.html');
}
function Markit()
{
	calcwindow=window.open('http://127.0.0.1/ico/watermark.php','MarkIt','width=280,height=180,toolbar=0,menubar=0,scrollbars=0,status=0,resizable=0,screenx=225,screeny=230');
}
function openDelWindow()
{
	calcwindow=window.open('http://127.0.0.1/dele.php','Delite','width=280,height=180,toolbar=0,menubar=0,scrollbars=0,status=0,resizable=0,screenx=225,screeny=230');
}
function Submit(action,criterij,red) {
var action;
var criterij;
var red;

document.as.count.value = action;
document.as.criterij.value = criterij;
document.as.red.value = red;

document.as.submit();
}
function prepare(flag) {
var flag;
document.form.flag.value = flag;
}
function arrange(criterij) {
var flag;
document.form.flag.value = flag;
}
function check_email(e) {
if(e=="your@mail.com")return (false);
ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
for(i=0; i < e.length ;i++){
if(ok.indexOf(e.charAt(i))<0){ 
return (false);
}
} 
if (document.images) {
re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
if (!e.match(re) && e.match(re_two)) {
return (-1);
} 
}
}

function check_form(f) { // f is the form (passed using the this keyword)
if((f.name.value.length < 1 || f.name.value == "" ) && f.language.value=="e"){
alert("You entered less than one character in the name field.");
f.name.focus(); // put the prompt in the name field 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
f.name.style.background = "#ED2F00";
}
// make sure the form is not submitted
return false;
}
else if((f.name.value.length < 1 || f.name.value == "" ) && form.language.value=="r" ){
alert("Ïîæàëóéñòà ââåäèòå èìÿ.");
f.name.focus(); // put the prompt in the name field 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
f.name.style.background = "#ED2F00";
}
// make sure the form is not submitted
return false;
}
else if((f.name.value.length < 1 || f.name.value == "" ) && form.language.value=="d" ){
alert("Sie sollen min. 1 Symbol fur Name einschreiben.");
f.name.focus(); // put the prompt in the name field 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
f.name.style.background = "#ED2F00";
}
// make sure the form is not submitted
return false;
}
// check the first email address ( the exclamation means "not" )
if(!check_email(f.email.value)&&(f.language.value=="e")){
alert("Invalid email detected.");
f.email.focus(); 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
f.email.style.background = "#ED2F00";
}
// make sure the form is not submitted
return false;
}
else if(!check_email(f.email.value)&&(form.language.value=="r")){
alert("Email ââåäåí íåêîððåêòíî");
f.email.focus(); 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
f.email.style.background = "#ED2F00";
}
// make sure the form is not submitted
return false;
}
if(!check_email(f.email.value)&&(form.language.value=="d")){
alert("Invalid email.");
f.email.focus(); 
// if the browser is Netscape 6 or IE
if(document.all || document.getElementByID){
// change the color of text field
f.email.style.background = "#ED2F00";
}
// make sure the form is not submitted
return false;
}
// check the second email address

}

function copyright(){
	alert("COPYRIGHT © WWW.STROINKOM.RU");
	return false;
}

//document.oncontextmenu=copyright;

/*
function curTime()
{


var time = new Date()
   var gmtMS = time.getTime() + (time.getTimezoneOffset() * 60000)
   var gmtTime =  new Date(gmtMS)
   var hrs = gmtTime.getHours() + 3
   var min = gmtTime.getMinutes()
   var sec = gmtTime.getSeconds()
var don="AM"
if (hrs>=12){ don="PM" }
if (hrs>12) { hrs-=12 }
if (hrs==0) { hrs=12 }
if (hrs<10) { hrs="0"+hrs }
if (min<10) { min="0"+min }
clock.innerHTML=hrs+":"+min+" "+don
setTimeout("curTime()",1000)
}

*/