leftPos=0
if (screen) {
	leftPos=(screen.width)/2-300
	}
	
function newWindowLogo(id, img, w, h) {
		faqLogoWindow = window.open("editLogo.php?id="+id+"&img="+img+"&w="+w+"&h="+h, "faqLogo", 'width=760,height=400,left='+leftPos+',top='+((screen.height)/2-250)+',status');
}	

function newWindowEXTL(id, i, link, opis) {
		faqEXTLWindow = window.open("editExtlinks.php?id="+id+"&i="+i+"&link="+link+"&opis="+opis, "faqEXTL", 'width=600,height=400,left='+leftPos+',top='+((screen.height)/2-250)+',status');
}
	
function newWindowPICOFD(id, i, img, col) {
		faqPICOFDWindow = window.open("editPicofd.php?id="+id+"&i="+i+"&img="+img+"&col="+col, "faqPICOFD", 'width=600,height=400,left='+leftPos+',top='+((screen.height)/2-250)+',status');
}	
	
function newWindow0(id, i, img, imgv) {
		faq0Window = window.open("editPlayer.php?id="+id+"&i="+i+"&img="+img+"&imgv="+imgv, "faq0", 'width=600,height=400,left='+leftPos+',top='+((screen.height)/2-250)+',status');
}

function newWindow1(id, i) {
		faq1Window = window.open("player.php?id="+id+"&i="+i, "faq1", 'width=500,height=300,left='+(leftPos+50)+',top='+((screen.height)/2-250)+',status');
}

function newWindow2(id, i, img, col, wl, hl) {
		faq2Window = window.open("editPicture.php?id="+id+"&i="+i+"&img="+img+"&col="+col+"&wl="+wl+"&hl="+hl, "faq2", 'width=600,height=400,left='+leftPos+',top='+((screen.height)/2-250)+',status');
}

function newWindow3(img, w, h) {
		faq3Window = window.open(img, "faq3", 'width='+w+',height='+h+',left='+((screen.width)/2-(w/2))+',top='+((screen.height)/2-(h/2))+',status');
}

function newWindowSP(id, i, img, col) {
		faqSPWindow = window.open("editSponzors.php?id="+id+"&i="+i+"&img="+img+"&col="+col, "faqSP", 'width=600,height=400,left='+leftPos+',top='+((screen.height)/2-250)+',status');
}

function checkForAction(s) {
    var returnValue = window.confirm('Da li zelite da '+s+'?');
	  return(returnValue);
}

function textCounter( field, countfield, maxlimit ) {
  if ( field.value.length > maxlimit )
  {
    field.value = field.value.substring( 0, maxlimit );
    alert( 'Textarea polje moze biti duzine do '+maxlimit+' karaktera.' );
    return false;
  }
  else
  {
    countfield.value = maxlimit - field.value.length;
  }
}
