/*function openWindow(url,name){
	popupWin = window.open(url, name, 'scrollbars,width=585,height=302')
}
function validateFormItems(){
	// Function checks if any form fields is empty and tells client that these fields has to be filled in.
	// IMPORTANT: First argument is the form name
	// HowTo: Send the form name as the first argument. After that. Send all form field names as an argument that needs to be checked.
	//        If the alert shoyld show other names for the elements not filled in, write a friendly name after the element name being checked.
	//        Example: validateFormItems('myForm','theElementName;theElemetsFriendlyName')
	intCount = 0;
	intArguments = validateFormItems.arguments.length;
	strAlertMessage = ''
	for(i=1; i < intArguments; i++){
	   tempItemArray = validateFormItems.arguments[i].split(";");
	   for(z=0; eval('z<document.'+validateFormItems.arguments[0]+'.elements.length'); z++) {
		  whichElement = eval('document.'+validateFormItems.arguments[0]+'.elements[z]');
          if (whichElement.name.indexOf(tempItemArray[0]) != -1){
			 if(whichElement.value == ''){
			    if(tempItemArray.length > 1) strAlertMessage = strAlertMessage + tempItemArray[1] + '\n'
				else strAlertMessage = strAlertMessage + tempItemArray[0] + '\n'
			 }   
		     intCount = intCount +1;
	      }
       }
	}
	if(strAlertMessage != ''){
		validateStatus = false;
		strAlertMessage = 'Du har ej skrivit all nödvändig information.\nFältet/fälten nedan kan ej vara tomma:\n\n' + strAlertMessage
		alert(strAlertMessage)
	}
	else{
		validateStatus = true;
	}
	return validateStatus;
}*/
// -------------------------------------------------------------------
// Function: openCustomizedWindow();
// Parameters: theURL,queryString,winName,features
// Description: Opens a new window with the url, querystring, winName and feautures specified  
// Used in modules: Public, WYSIWYG
// -------------------------------------------------------------------
function openCustomizedWindow(theURL,queryString,winName,features){
	// ----------------------------
	// Define local variables
	var features;
	var popupWin;
	// ----------------------------
	if(queryString != "") queryString = "?" + queryString
	if(winName==""){
		winName=new Date();
		winName=winName.getSeconds()+"_"+winName.getMinutes()+"_"+winName.getHours();
	}
	popupWin = window.open(theURL+queryString,winName,features);
	if (!popupWin.opener) popupWin.opener = self;
    popupWin.focus();
}
// -------------------------------------------------------------------
// Function: docPrint();
// Parameters: none
// Description: Emulates pushing the browsers print button and calls the print dialog box
// Used in modules: Public
// -------------------------------------------------------------------
function docPrint() {
	if (navigator.appName == "Netscape") {
		window.print();
	} else {
		document.body.insertAdjacentHTML("beforeEnd", "<object id='PrHandle' width=0 height=0 classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>");
		PrHandle.ExecWB(6,2);
	}
}
