﻿/*function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}
function checkCookie() {
	glasal_ank=getCookie('glasal_ank');
	if (glasal_ank!='glasal')
	  {
	  setCookie('glasal_ank','pocnaldaglasa',1);
	  }
	else
	  {
		alert('Welcome again '+glasal_ank+'!');
	  }
}*/

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function get_radio_value()
{
	//alert('sss')
for (var i=0; i < document.form1.RadioGroup1.length; i++)
//document.getElementById('RadioGroup1')
   {
   if (document.form1.RadioGroup1[i].checked)
      {
      var rad_val = document.form1.RadioGroup1[i].value;
	  var tocno = 'da'
	 // return false;
      }
	//else
	// {rad_val='prazno'}
   }
   //alert(tocno);
   
   
if (tocno!='da')
      {alert('Внесете некој одговор!');
	  return false;}

getJSP('anketa_vnesi_eng.asp?id='+rad_val+'&idanketa='+document.getElementById('idanketa').value,'anketa',null, null, 0)
 // return false;
}

function get_radio_value_eng()
{
	//alert('sss')
for (var i=0; i < document.form1.RadioGroup1.length; i++)
//document.getElementById('RadioGroup1')
   {
   if (document.form1.RadioGroup1[i].checked)
      {
      var rad_val = document.form1.RadioGroup1[i].value;
	  var tocno = 'da'
	 // return false;
      }
	//else
	// {rad_val='prazno'}
   }
   //alert(tocno);
   
   
if (tocno!='da')
      {alert('Answer the pool!');
	  return false;}

getJSP('anketa_vnesi_eng.asp?id='+rad_val+'&idanketa='+document.getElementById('idanketa').value,'anketa',null, null, 0)
 // return false;
}

function spodeli() {
	var ispisi = '<a title="сподели на Facebook" href="http://www.facebook.com/sharer.php?u=';
	ispisi = ispisi + (encodeURIComponent(document.location.href));
	ispisi = ispisi + '&t='+encodeURIComponent(document.title)+'" target="_blank">';
	ispisi = ispisi + '<img src="/Images/fb_share.gif" alt="сподели на Facebook" border="0" vspace="5" /></a>';
	document.write (ispisi); 
}
function spodeli_eng() {
	var ispisi = '<a title="share on Facebook" href="http://www.facebook.com/sharer.php?u=';
	ispisi = ispisi + (encodeURIComponent(document.location.href));
	ispisi = ispisi + '&t='+encodeURIComponent(document.title)+'" target="_blank">';
	ispisi = ispisi + '<img src="/Images/fb_share_eng.gif" alt="share on Facebook" border="0" vspace="5" /></a>';
	document.write (ispisi); 
}
