//
function nav()
   {
   var w = document.myform.mylist.selectedIndex;
   var url_add = document.myform.mylist.options[w].value;
   window.location.href = url_add;
   }
// komentari: glasanje 

<script language="JavaScript" type="text/javascript">

function attach_file( p_script_url ) {
      script = document.createElement( 'script' );
      script.src = p_script_url;
      document.getElementsByTagName( 'head' )[0].appendChild( script );
}

function show_status( status_text ) {
    document.getElementById('status').innerHTML = status_text;
}
// done hiding -->
</script>


// komentari: smilies, quote 

<script language="JavaScript1.2">
var isIE = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));

function save()
{ 
	if (isIE) if (document.comment_form.comment_text.createTextRange()) document.comment_form.comment_text.caretPos = document.selection.createRange().duplicate();
}

function insert(txt)
{
	if (document.comment_form.comment_text.createTextRange() && document.comment_form.comment_text.caretPos)
	{      
		var cp = document.comment_form.comment_text.caretPos; 
		cp.text = cp.text.charAt(cp.text.length - 1) == ' ' ? txt + ' ' : txt;
	}
	
	<!--else document.comment_form.comment_text.value += txt;-->
	document.comment_form.comment_text.focus(cp);
}

function printpost(post)
{
	pp = window.open('printpost.php?post_id=' + post,'pp','location=no,statusbar=no,menubar=no,scrollbars=yes');
	pp.focus();
}

function sendpost(post)
{
	sp = window.open('sendpost.php?post_id=' + post,'sp','width=630,height=400,location=no,statusbar=no,menubar=no,scrollbars=yes');
	sp.focus();
}

function insert_smiley(sm)
{
    if (isIE) insert(sm); document.comment_form.comment_text.value = document.comment_form.comment_text.value + ' ' + sm;
}

function insert_code(tag_desc,open_tag,close_tag)
{
	var sm = prompt(tag_desc,"");
    if (sm) {
	  sm = open_tag+sm+close_tag;
	} else {
	  sm = "";
	}
	if (isIE) insert(sm); else document.comment_form.comment_text.value = document.comment_form.comment_text.value + ' ' + sm;
}

function preview_form()
{
	var win=window.open("", "p", "left=50,top=30,width=725,height=450,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");

	win.document.write("<html><body>");
	win.document.write("<form name=\"p\" action=\"preview_post.php\" method=\"post\">");
	var exists = eval(document.comment_form["user_name"]);
	if (exists) {
		win.document.write("<input type=\"hidden\" name=\"user_name\" value=\""+document.comment_form.user_name.value+"\">");
	}

	win.document.write("<input type=\"hidden\" name=\"comment_text\" value=\"\">");
	win.document.write("<input type=\"hidden\" name=\"preview\" value=\"yes\">");
	win.document.write("</form></html>");
	win.document.p.comment_text.value = document.comment_form.comment_text.value;
	win.document.p.submit();
	win.focus();

}

</script>

// popup

<SCRIPT TYPE="text/javascript">

function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=450,height=500,scrollbars=no');
return false;
}

</SCRIPT>

// provjeriti 1

<SCRIPT language=JavaScript type=text/javascript>

var BWflag = false;

var Initialized = false;

function InitFilters()
{
	if(Initialized) return;
	Initialized = true;
	document.all.mainpic.style.filter = "Gray";
	document.all.mainpic.filters["Gray"].enabled = BWflag;
}

function flipBW()
{
	InitFilters();
	BWflag = !BWflag;

	document.all.mainpic.filters["Gray"].enabled = BWflag;

	if(BWflag) document.all.bw.src = "img/ikona_bw2.gif";
	else document.all.bw.src = "img/ikona_bw1.gif";
}

</SCRIPT>

// provjeriti 2

<script type="text/javascript">
<!--
var newwindow;
function poptastic(url)
{
	newwindow=window.open(url,'name','height=250,width=400');
	if (window.focus) {newwindow.focus()}
}
-->
</script>

// rotirajuci banner TOP

<script language='JavaScript' type='text/javascript'>
<!--
   if (!document.phpAds_used) document.phpAds_used = ',';
   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   
   document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
   document.write ("http://hrphotocontest.com/banner/adjs.php?n=" + phpAds_random);
   document.write ("&amp;what=zone:4");
   document.write ("&amp;exclude=" + document.phpAds_used);
   if (document.referer)
      document.write ("&amp;referer=" + escape(document.referer));
   document.write ("'><" + "/script>");
//-->
</script>

<script language='JavaScript' type='text/javascript'>
<!--
function expandingWindow(website) {
   var winwidth = screen.availWidth;
   var winheight = screen.availHeight;

if (document.all) {
   var sizer = window.open("","",'left=0,top=0,width='+winwidth+',height='+winheight+',scrollbars=auto,fullscreen=yes');
   sizer.location = website;
} else {
   window.open('/viewpicwindow.php?photoid=1520449','fotowindow','width=winwidth,height=winheight,menubar=no,status=no,location=no,scrollbars=auto,fullscreen=yes,directories=no,resizable=yes');
   }
}
//-->
</script>