function showModalWindow(wlocation, wwidth, wheight, ismodal, istransparent){
	  	if (wwidth == null) wwidth = 350;
	  	if (wheight == null) wheight = 400;
			var win = new Window('soundofnepalpop', {className: "alphacube", width: wwidth, height: wheight, zIndex: 100, resizable: true, title: '', url:wlocation, showEffect:Effect.Appear, hideEffect: Effect.SwitchOff, draggable:true,minimizable:false, maximizable:false, wiredDrag: true});
		 win.setDestroyOnClose(); 
		 
		 if (istransparent != null) {win.setOpacity = 0.89;}
		 
		 if (ismodal == null) {
		 	win.showCenter(true); 
			}
			else{
			win.showCenter();
			}	
	}


function openPopup(obj, boxWidth, boxHeight, resizeable, name){

		
		var wlocation = ''
		if (name == ""){
			name = 'soundsofnepalPop';
		}
		
		if (obj.href != null) {
			wlocation = obj.href
	
		} else {
			wlocation = obj
		}
		var win = new Window('soundofnepalpop', {className: "alphacube", width:350, height:400, zIndex: 100, resizable: true, title: '', url:wlocation, showEffect:Effect.Appear, hideEffect: Effect.SwitchOff, draggable:true, minimizable:false, maximizable:false, wiredDrag: true});
		win.setDestroyOnClose();
		win.setOpacity(0.80); 

		win.showCenter(true);
		//return thisWin;
	}		

function openMediaPlayer(myurl, boxWidth, boxHeight){
		var sw = screen.width;
		var sh = screen.height;
		var winOpt = "width=" + boxWidth + ",height=" + boxHeight + ",left=" + ((sw - boxWidth) / 2) + ",top=" + ((sh - boxHeight) / 2) + ",menubar=no,toolbar=no,location=0,directories=no,status=0,scrollbars=no,resizable=yes";
		thisWin = window.open(myurl,'embeddedPlayer',winOpt);
	  return thisWin;
	}
	
function SubmitForm(form, a, replace) {  
		if (replace) { 
			document.forms[form].action = a; 
		} else {
			document.forms[form].action = document.forms[form].action + a;  
		}
		document.forms[form].submit(); 
	}

function CheckBoxes(form, v){
		for (var i=0; i < document.forms[form].elements.length; i++) {
			var j = document.forms[form].elements[i];
			if (j.type == "checkbox") { j.checked = v; }
		}
	}

function variablePrompt(formname,varname,text) {
	var v = prompt(text);
	document.forms[formname].elements[varname].value = v; 
}