


var copytoclip=1

function HighlightAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
 if (document.all&&copytoclip==1){
  therange=tempval.createTextRange()
  therange.execCommand("Copy")
  window.status="Contents highlighted and copied to clipboard!"
  setTimeout("window.status=''",2400);
  }
}



function highlight(field) {
       field.focus();
       field.select();
}

function favorites() {
 if(document.all)
 window.external.AddFavorite(url,title)
}

function assign_val (num1, num2) {
       return num1 * 5 + num2;
}


function checkValue(radioGroupName) { // With radio buttons
  var bfound = false;
  var FoundValue = "";
  radios = document.getElementsByName(radioGroupName);
  for (i = 0; i < radios.length; i++) {
    if (radios[i].checked) bfound = true;
    if (radios[i].checked) FoundValue = radios[i].value;
  }
  if (bfound==true) {
    if (FoundValue=="SFW") {
	swfu.setUploadURL("../upload.php");
    } 
    if (FoundValue=="NSFW") {
	swfu.setUploadURL("../upload_cat1.php");
    }
    swfu.startUpload();
  } else {
    alert ("Select content type!");
  }
}
function checkValue2(list) { //with list
var cat=document.getElementById("categorie").value;
 if(cat!="none")
 	{
		var url="http://www.jamaswapi.be/gallery/upload.php?name=";
		var url2=url+cat;
		swfu.setUploadURL(url2);
		swfu.startUpload();
	}
	else {alert ("Kies een categorie!");}
}