var hop = new Array();
function open_talk(sid,user)
{
	if (user == '')
		return 0;
	window.open("http://www.imeet.ru/mes/wnd.php?SID=" + sid + "&selectuser=" + user+'&rnd=' + Math.round(Math.random()*1000000000), "TalkAbout"+sid+"_"+user, "width=630, height=370, directories=no, toolbar=no, location=no, menubar=no, status=no");
	return false;
}
function open_viewer(ph,SID)
{
	window.open('http://www.photovision.ru/viewer.php?photo=' + ph + '&SID='+SID,null,"height=500,width=600,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	return false;
}
function open_up(user)
{
	window.open("http://www.imeet.ru/up.php?usr=" + user+'&rnd=' + Math.round(Math.random()*1000000000), "UserUp", "width=500, height=400, directories=no, toolbar=no, location=no, menubar=no, status=no");
	return false;
}
function open_vote(kid, uid, SID)
{
	window.open('http://www.imeet.ru/konkurs_vote.php?kid=' + kid + '&uid=' + uid + '&SID=' + SID, null, "height=500,width=600,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
	return false;
}

function win(link) {
	window.open(link,null,"height=300,width=400,status=yes,toolbar=no,menubar=no,location=no");
	return false;
}
function win2(sid,us) {
	window.open('http://www.imeet.ru/mes/index.php?SID='+sid+'&selectuser='+us, 'TalkAbout', 'width=630, height=370, directories=no, toolbar=no, location=no, menubar=no, status=no');
	return false;
}
function open_ank(us,sid) {
	var w = window.open('http://www.findheart.ru/userinfo.php?a='+us+'&SID='+sid, 'ank'+us, 'width=600,height='+window.screen.availHeight+', directories=no, toolbar=no, location=no, menubar=no, status=no,top=0,left=0,resizable=yes,scrollbars=yes');
	return false;
}

function add_photo_score(id)
{
	var s = GetCookie("photo_score");
	s=s+",*"+id;
	SetCookie("photo_score",s);
	alert("Ваш голос принят");
}
function min_photo_score(id)
{
	var s = GetCookie("photo_score");
	s=s+",-"+id;
	SetCookie("photo_score",s);
	alert("Ваш голос принят");
}
function GetCookie(sName)
{
  var aCookie = document.cookie.split("; ");
  for (var i=0; i < aCookie.length; i++)
  {
    var aCrumb = aCookie[i].split("=");
    if (sName == aCrumb[0]) 
      return unescape(aCrumb[1]);
  }
  return "";
}

function SetCookie(sName, sValue)
{
  var date = new Date();
  document.cookie = sName + "=" + escape(sValue) + "";
}
function do_change(x){
	for(i=0;i<document.all.bigphoto.filters.length;i++){
		if(i!=x) hop[i]=0;
		document.all.bigphoto.filters[i].enabled = 0;
	}
	hop[x] = !hop[x];
	document.all.bigphoto.filters[x].enabled = hop[x];
	return false;
}

