function openhelp(id, ida) {
okno_helpa=window.open('http://www.graand.com/help.php?id=' + id + '&ida=' + ida ,'help','width=600,height=500,left=30,top=10,screenX=10,screenY=10,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
okno_helpa.focus();
} 
function openfees() {
okno_fees=window.open('http://www.graand.com/fees.php','Fees','width=400,height=450,left=30,top=10,screenX=10,screenY=10,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
okno_fees.focus();
} 
function changeCase(frmObj) {
var index;
var tmpStr;
var tmpChar;
var preString;
var postString;
var strlen;
tmpStr = frmObj.value.toLowerCase();
strLen = tmpStr.length;
if (strLen > 0)  {
for (index = 0; index < strLen; index++)  {
if (index == 0)  {
tmpChar = tmpStr.substring(0,1).toUpperCase();
postString = tmpStr.substring(1,strLen);
tmpStr = tmpChar + postString;
}
else {
tmpChar = tmpStr.substring(index, index+1);
if (tmpChar == " " && index < (strLen-1))  {
tmpChar = tmpStr.substring(index+1, index+2).toUpperCase();
preString = tmpStr.substring(0, index+1);
postString = tmpStr.substring(index+2,strLen);
tmpStr = preString + tmpChar + postString;
         }
      }
   }
}
frmObj.value = tmpStr;
}
function create_picture_window (image, width, height) {
    width = width + 50;
    height = height + 70;
	if (width>(screen.width-100)) {
		width = screen.width - 100;
	}
	if (height>(screen.height-100)) {
		height = screen.height - 100;
	}
    if (window.popup_window && !window.popup_window.closed) {
        window.popup_window.resizeTo (width, height);
    } 
	var window_specs = "location=no, scrollbars=yes, menubars=no, toolbars=no, resizable=yes, left=0, top=0, width=" + width + ", height=" + height;
	var url = "http://www.graand.com/show_image.php?image=" + image;
	popup_window = window.open(url, "PictureWindow", window_specs);
	popup_window.focus();
}
