//Colors - Change Image
function showPic (whichpic) {
 if (document.getElementById) {
  document.getElementById('placeholder').src = whichpic.href;
  if (whichpic.title) {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
  } else {
   document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}
//====================================
/*
//Details - Change Image
function show_one() {
showOne("tab_one");
alert(1);
hideOne("tab_two");
alert(2);
hideOne("tab_three");
hideOne("tab_four");
get_value();
a = 1;
//document.gbg_F1.q.focus();
}

function show_two() {
hideOne("tab_one");
showOne("tab_two");
hideOne("tab_three");
hideOne("tab_four");
get_value();
a = 2;
//document.gbg_F2.q.focus();
}

function show_three() {
hideOne("tab_one");
hideOne("tab_two");
showOne("tab_three");
hideOne("tab_four");
get_value();
a = 3;
//document.gbg_F3.q.focus();
}

function show_four() {
hideOne("tab_one");
hideOne("tab_two");
hideOne("tab_three");
showOne("tab_four");
get_value();
a = 4;
//document.gbg_F4.q.focus();
}
*/
function showOne(id){
getObj(id).style.display="block";
}

function hideOne(id){
getObj(id).style.display="none";
}

function getObj(id){
var obj=false;
if(document.getElementById(id)) obj=document.getElementById(id);
return obj
}
//====================================
//Form Valid
function LTrim(str){
	if (str == null){ return null; }
	for(var i = 0; str.charAt(i) == " "; i++);
	return str.substring(i, str.length);
}

function RTrim(str){
	if (str == null){return null;}
	for(var i = str.length-1; str.charAt(i)==" "; i--);
	return str.substring(0, i+1);
}

function Trim(str){ return LTrim(RTrim(str)); }

function validQReq(){
	if(Trim(document.frmQReq.name.value).length < 2){
		alert("Моля, въведете ?ме (мин. 2 знака).");
		document.frmQReq.name.focus();
		document.frmQReq.name.select();
		return false;
	}
	var regstr1 = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)" 
	var regstr2 = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$" 
	var regExp1 = new RegExp(regstr1) 
	var regExp2 = new RegExp(regstr2) 
	var regExp3 = /[^a-zA-Z0-9\-_.@]/ 
	if(!(!regExp1.test(Trim(document.frmQReq.email.value)) && regExp2.test(Trim(document.frmQReq.email.value)) && !regExp3.test(Trim(document.frmQReq.email.value))) || !(Trim(document.frmQReq.email.value).indexOf("@")>=0)){
		alert("Моля, въведете Електронна поща.");
		document.frmQReq.email.focus();
		document.frmQReq.email.select();
		return false;
	}
		if(Trim(document.frmQReq.phone.value).length < 6){
		alert("Моля, въведете Телефон (мин. 6 знака).");
		document.frmQReq.phone.focus();
		document.frmQReq.phone.select();
		return false;
	}
	
	if(Trim(document.frmQReq.mobile.value).length < 6){
		alert("Моля, въведете номер на мобилен телефон(мин. 6 знака).");
		document.frmQReq.mobile.focus();
		document.frmQReq.mobile.select();
		return false;
	}
	
		if(Trim(document.frmQReq.model.value).length < 3){
		alert("Моля, въведете Модел (мин. 3 знака).");
		document.frmQReq.model.focus();
		document.frmQReq.model.select();
		return false;
	}
		if(Trim(document.frmQReq.city.value).length < 2){
		alert("Моля, въведете Град (мин. 2 знака).");
		document.frmQReq.city.focus();
		document.frmQReq.city.select();
		return false;
	}
		if(Trim(document.frmQReq.address.value).length < 10){
		alert("Моля, въведете Адрес (мин. 10 знака).");
		document.frmQReq.address.focus();
		document.frmQReq.address.select();
		return false;
	}
	return true;
}
//====================================
//StatCounter
var sc_project=1681438; 
var sc_invisible=0; 
var sc_partition=16; 
var sc_security="fa51d514"; 
var sc_text=3; 
//====================================