// JavaScript Document
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}
function clickrecall(thisfield, defaulttext) {
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}

function popupper(url,x,y,name,sb,rs,st,lt,tb) {

// url: url of your popup
// x,y: popup width and height (your popup will be centered in the screen of course)
// name: your popup name (useful if you want to call multiple pages on the same popup)
// sb: set it to 1 to have scrollbars
// rs: set it to 1 to make the popup resizable
// st: set it to 1 to display status
// lt: set it to 1 to have location
// tb: set it to 1 to have toolbars

    var win = null;
    var centerwidth=(screen.width/2)-(x/2);
    var centerheight=(screen.height/2)-(y/2);
    var scrollbarstext = 'scrollbars = no,';
    var resizabletext = 'resizable = no,';
    var statustext = 'status = no,';
    var locationtext = 'location = no,';
    var toolbartext = 'toolbar = no,';
    var features = '';
    if (sb == 1){
      scrollbarstext = 'scrollbars = yes,'
    }
    if (rs == 1){
      resizabletext = 'resizable = yes,'
    }
    if (st == 1){
        statustext = 'status = yes,'
    }
    if (lt == 1){
        locationtext = 'location = yes,'
    }
    if (tb == 1){
        toolbartext = 'toolbar = yes,'
    }
    features = scrollbarstext+resizabletext+statustext;
    features = features + locationtext+toolbartext;
    features = features + 'width = '+x+',height = '+y;
    features = features + ',top = ' + centerheight;
    features = features + ',left = ' + centerwidth;
    win = window.open(url, name, features);
  }


