/*
 * syspack.js JS Library 2.2
 * Copyright(c) 2006-2009, photopost.
 * all rights reserved
 * 
 * http://www.photopost.com.br
 */

			   
// NewPopup
function NewPopup(url,left,top,width,height,scroll) {
    features = "left="+left+",top="+top+",width="+width+",height="+height+",toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no"+",scrollbars="+scroll;
    popup = window.open( url,"Photo",features);
    if (window.focus)
    popup.focus();
}

// CheckAll
// marcad todos os checkbox da pagina
function CheckAll(spanChk){
	// Added as ASPX uses SPAN for checkbox
	var oItem = spanChk.children;          
	var theBox=(spanChk.type=="checkbox")?spanChk:spanChk.children.item[0];
	xState=theBox.checked;                                                 
	elm=theBox.form.elements;                                              
	for(i=0;i<elm.length;i++)                                              
	if(elm[i].type=="checkbox" && elm[i].id!=theBox.id)                    
	{                                                                      
		//elm[i].click();                                                      
		if(elm[i].checked!=xState)                                             
		elm[i].click();                                                        
		//elm[i].checked=xState;                                               
	}                                                                      
}                                
		

