
    var singletext=new Array();
    singletext[0]='<table cellspacing="0" cellpadding="0" align="center"><tr><td height="80" valign="middle"><div class=tanc><a class=tabb target="_self" href="/atsauksmes">ventspils brīvostas pārvalde</a><br />.."mājas lapai tika piemeklēts viss atbilstošākais risinājums, kura rezultātā tika radīta mūsdienīga, kvalitatīva mājas lapa, kā arī patiess prieks par ērti lietojamo satura vadības sistēmu"..</div></td></tr></table>';
    singletext[1]='<table cellspacing="0" cellpadding="0" align="center"><tr><td height="80" valign="middle"><div class=tanc><a class=tabb target="_self" href="/atsauksmes">ventspils augsto tehnoloģiju parks</a><br />.."sflkjbvglksabdvlksdbfvkbsdkvbskdbvkasbdvkjbas kbasdkg baskdbg"..</div></td></tr></table>';
    singletext[2]='<table cellspacing="0" cellpadding="0" align="center"><tr><td height="80" valign="middle"><div class=tanc><a class=tabb target="_self" href="/atsauksmes">alsungas pagasta biedrība "suiti novads"</a><br />.."sflkjbvglksabdvlksdbfvkbsdkvbskdbvkasbdvkjbas kbasdkg baskdbg"..</div></td></tr></table>';
    singletext[3]='<table cellspacing="0" cellpadding="0" align="center"><tr><td height="80" valign="middle"><div class=tanc><a class=tabb target="_self" href="/atsauksmes">sia "a&j investment company"</a><br />.."sflkjbvglksabdvlksdbfvkbsdkvbskdbvkasbdvkjbas kbasdkg baskdbg"..</div></td></tr></table>';
/**************************************
*    http://javascripts.vbarsan.com/
*    This notice may not be removed
**************************************/

//-- Begin Scroller's Parameters and messages -->
//scroller's width
var swidth=400;

//scroller's height
var sheight=70;

//scroller's speed
var sspeed=1;
var restart=sspeed;
var rspeed=sspeed;

//scroller's pause
var spause=4000;

//scroller's background
var sbcolor="#899CB8";

//messages: set your own; use as many as you'd like; set up Hyperlinks to
//URLs as you normally do: <a target=... href="... URL ...">..message..</a>;

//singletext[3]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td height="80" valign="middle"><div class=tan><b>Javascript Vertical Scroller v3.5</b><br>Once a message left, next one comes in.<br>Adjustable: Size,Speed,Pause,Background.<br>Speed may be adjusted on the fly as well!<br>Runs any number of Messages/Images.</div></td></tr></table>';
//singletext[4]='<div class=tan>= message begins =<br />Any message may be <b><i>as large as desired.</i><br />On Windows/Linux:</b><br />ie4+ firefox1+ ns6+ opera7+ ns4+.<br /><b>On Mac OS X</b>: Safari, ie5+ firefox1+ opera7+.<br /><br /><font color="olive">Any wider row will automatically be adjusted into as many rows as to fit the width you set for the scrolling area.</font><br /><br />One may use <b><i>any basic HTML code.</i></b><br /><br />= message ends =</div>';
//singletext[...]='...';
//-- end Parameters and message -->

//-- begin: Scroller's Algorithm -->
var ii=0;

function goup(){if(sspeed!=rspeed*16){sspeed=sspeed*2;restart=sspeed;}}

function start(){
if(document.getElementById){ns6div=document.getElementById('iens6div');ns6div.style.top=sheight+"px";ns6div.innerHTML=singletext[0];sizeup=ns6div.offsetHeight;ns6scroll();}
else
if(document.layers){ns4layer=document.ns4div.document.ns4div1;ns4layer.top=sheight;ns4layer.document.write(singletext[0]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}
else
if(document.all){iediv=iens6div;iediv.style.pixelTop=sheight+"px";iediv.innerHTML=singletext[0];sizeup=iediv.offsetHeight;iescroll();}}
function iescroll(){if(iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){iediv.style.pixelTop=0;setTimeout("iescroll()",spause);}else
if(iediv.style.pixelTop>=sizeup*-1){iediv.style.pixelTop-=sspeed+"px";setTimeout("iescroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;iediv.style.pixelTop=sheight+"px";iediv.innerHTML=singletext[ii];sizeup=iediv.offsetHeight;iescroll();}}
function ns4scroll(){if(ns4layer.top>0&&ns4layer.top<=sspeed){ns4layer.top=0;setTimeout("ns4scroll()",spause);}else
if(ns4layer.top>=sizeup*-1){ns4layer.top-=sspeed;setTimeout("ns4scroll()",100);}else{if(ii==singletext.length-1)ii=0;else ii++;ns4layer.top=sheight;ns4layer.document.write(singletext[ii]);ns4layer.document.close();sizeup=ns4layer.document.height;ns4scroll();}}
function ns6scroll(){if(parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){ns6div.style.top=0;setTimeout("ns6scroll()",spause);}else
if(parseInt(ns6div.style.top)>=sizeup*-1){ns6div.style.top=parseInt(ns6div.style.top)-sspeed+"px";setTimeout("ns6scroll()",100);}
else{if(ii==singletext.length-1)ii=0;else ii++;
ns6div.style.top=sheight+"px";ns6div.innerHTML=singletext[ii];sizeup=ns6div.offsetHeight;ns6scroll();}}




function questionSubmit(l,lang){

    $('question_loading').show(); //lang+
    var notice = $('questionFormDiv');
        var url = SERVER_URL+'questions/';
        var aj = new Ajax.Request(
            url, {
            method:'post',
            parameters: $("questionForm").serialize(),
            onCreate: function(){
              notice.innerHTML = '';
            },
            onSuccess: function (transport) {
                var transport_text = transport.responseText;
                notice.innerHTML = transport_text;
                $('question_loading').hide();
              }
            }
        );
}


function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   //alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   //alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    //alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    //alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(" ")!=-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }

 		 return true
	}

function ValidateForm(question){
	var emailID=document.getElementById('email');
    var questionID=document.getElementById('question').value;

	if ((emailID.value==null)||(emailID.value=="")){
		//alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		//emailID.value=""
		emailID.focus()
		return false
	}

    if(questionID.length<10 || questionID == question){
        document.getElementById('question').focus();
        return false;
    }
	return true
 }


