//-------------------------------------------------------------
//                      Javascript                          ---
//------------------------------------------------------------- 
//-------------------------------------------------------------
//---  © copyright 2002 by altug.salini FUGO                ---
//-------------------------------------------------------------
//   projekt name  :                                        ---
//   file name     : functions.js                           ---
//   directory     : /_js                                   ---
//   version       : 1.0                                    ---
//   created at    :                                        ---
//   created by    : altug salini   info@fugo.ch            ---
//   change hisory :                                        ---
//   changed at    :                                        ---
//-------------------------------------------------------------

// print window
function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}

// let user confirm; FORM SUBMIT 
function isOKFormSubmit (sFormName,sMessage) 
	{ if(confirm(sMessage)) window.document.forms[sFormName].submit(); } 	
	
// let user confirm; LOCATION   
function isOKlocation (sURL, sMessage) 
	{ if(confirm(sMessage)) {location.href = sURL;} } 	

// check / uncheck all checkboxes in form
// sFromname =  Form name (String)
// sCheckboxName = Checkbox Field Name (String)
// bChecked = checked or not (Boolean : true/false)
function checkAllBoxes (sFormName, sCheckboxName, bChecked) 
	{ 
	iUpperBound = document.forms[sFormName].elements[sCheckboxName].length;		
	for(var iX = 0; iX < iUpperBound; iX++)
		document.forms[sFormName].elements[sCheckboxName][iX].checked = bChecked;
	} 	

function ImageGallery(link)
{
var w=window.open(link,"Gallery","scrollbars=no,resizable=yes,width=576,height=530")
w.focus();
}
	
	

/* CSFS POPUP FUNCTIONS */
var tipWin = null;

function streamWin(str)
{
        window.open(str,'tipWin','width=300,height=360,resizeable=no,scrollbars=no');
}

function streamWinInd(str)
{
        window.open(str,'tipWin','width=300,height=420,resizeable=no,scrollbars=no');
}

function streamWint(str)
{
        window.open(str,'tipWin','width=300,height=365,resizeable=no,scrollbars=no');
}


function Popup(link)
{
var w=window.open(link,"galerie","scrollbars=no,resizable=no,width=440,height=550")
w.focus();
}


function pup(where)
	{ 
                        var w = window.open(where, "graphic_win", "scrollbars=1,resizable=0,width=526,height=312")
                        w.focus()
	}
	
// open window for expert question
function askTheExpert()
	   {
	      var newWind=window.open('expert.cfm?aoid=#vaArticleObjectID#','remote','width=576,height=530 top=0 left=0');
	      if (newWind.opener == null){ 
					newWind.opener = window; 
				}
		}