/*
 * © IT Media, 2008
 * www.itmedia.lv
 * info@itmedia.lv
 */

  function strpos(haystack,needle,offset){
    var i=(haystack+'').indexOf(needle,offset);
    return i===-1?false:i;
  }

  function o(url,w,h){
    window.open(url,'','height='+h+',width='+w+',scrollbars=yes,resizable=no,toolbar=no,location=no,status=yes,menubar=no');
    return false;
  }

  function createplayer(file,image,width,height){  	$("#fancy_content").html('<embed src="/swf/player.swf" bgcolor="#FFFFFF" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowfullscreen="true" flashvars="file=/uimg/'+file+'&amp;showdigits=true&amp;image=/uimg/'+image+'&amp;logo=/images/video_logo.png&amp;autostart=true&amp;controlbar=over&amp;abouttext=IT Media&amp;aboutlink=http://www.itmedia.lv/" width="'+width+'" height="'+height+'" wmode="transparent"><\/embed>');  }

  function createmap(){  	$("#map").html('<embed src="/swf/map.swf" bgcolor="#FFFFFF" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"  width="620" height="350" wmode="transparent"><\/embed>');  }

  function check_topics(){  	var state = null;  	$("#tsall").each(function(){      state = this.checked;  	});
  	$("#form").find("input[name='req[topics][]']").attr("checked",state);  }