window.onload = function() {
	// check to see that the browser supports the getElementsByTagName method
	// if not, exit the loop 
	if (!document.getElementsByTagName) {
		
		return false; 
	} 
	// create an array of objects of each link in the document 
	var popuplinks = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < popuplinks.length; i++) {	

		// if the link has a class of "popup"...	
		//if (popuplinks[i].getAttribute("class") == "popup") {	
		if (popuplinks[i].className == "popup") 
		{	
		
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openPopUp 	
			popuplinks[i].onclick = function() 
			{	
				openPopUp(this.getAttribute("href"),800,800);	
				return false; 	
			} 	
		}
		else if (popuplinks[i].className == "popupForm")
		{
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openPopUp 	
			popuplinks[i].onclick = function() 
			{	
				openPopUp(this.getAttribute("href"),300,400);	
				return false; 	
			} 	
		}
		else if (popuplinks[i].className == "popupImage")
		{
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openPopUp 	
			popuplinks[i].onclick = function() 
			{	
				//openPopUp(this.getAttribute("href"),550,230);	
				window.open(this.getAttribute("href"),'popup','scrollbars=1,width=550,"mywindow",height=260,top=300,left=400')
				return false; 	
			} 	
		}
	} 
} 

function openPopUp(linkURL,width,height) {
window.open(linkURL,'popup','scrollbars=1,width='+width+',height='+height+'')
}

function confDel(type) 
{
	//if (type == 'Ad')
	//{
		var answer = confirm("Do you want to delete this "+type+" ? ", "Delete");
	//}

	return answer;
}

