// Cookies

function setVideoParams(c_name,value)
{
var expiredays = 1 ;
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}


function getVideoParams(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 checkVideoAutoS(c_name)
//{
//VideoParam=getVideoParams(c_name);
//if (VideoParam!=null && VideoParam!="")
//  {
// getVideoParams(c_name);
//  }
//  else 
//  {
//	setVideoParams('autoVal',true);  
//    setVideoParams('videoFile','/uploads/videos/VideoGeneral.mp4');
//  }
//}

function checkVideoParams(c_name)
{
VideoParam=getVideoParams(c_name);
 if (VideoParam!=null && VideoParam!="")
  { //alert ('1')
 return VideoParam ;
  }
  else if (c_name == 'autoVal' ) 
  { //alert ('2')
	setVideoParams('autoVal',true); 
	VideoParam   = getVideoParams(c_name);
  }
  else if (c_name == 'videoFile' )
  {  //alert ('3')
    setVideoParams('videoFile','/uploads/videos/VideoGeneral.mp4');
	VideoParam  = getVideoParams(c_name);
  }
}