
function openwin(page,size)
{
window.open(page,"newuser","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,"+ size);
}

function winopen(url)
{
window.open(url,"search","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=600,height=400,top=100,left=100");
}

function MM_openBrWindow(theURL,winName,features) 
{
window.open(theURL,winName,features);
}

// Must launched on the body onload event handler for IE
// Use document.documentElement if you are in Compat mode

function resizeIframe() 
{
i = parent.document.getElementById(window.name)
iHeight = document.body.scrollHeight
i.style.height = iHeight + 5 + "px"
}

//to stop see source code by click right button
if (window.Event) 
{
document.captureEvents(Event.MOUSEUP); 
}

function nocontextmenu() 
	{
	event.cancelBubble = true
	event.returnValue = false;
	alert('You are welcome to visit our website!');
	return false;
}

function norightclick(e) 
{
	if (window.Event) 
	{
	if (e.which == 2 || e.which == 3)
	alert('You are welcome to visit our website!');
	return false;
	}
	else
	if (event.button == 2 || event.button == 3)
	{
	alert('You are welcome to visit our website!');
	event.cancelBubble = true
	event.returnValue = false;
	return false;
	}
}
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others


//pull down mwnu control
function LoadImgs()
{
	  if (document.images || IE4) {
	  	menu0 = new Image(); menu0.src="/images/forward.gif"; menu1 = new Image(); menu1.src="/images/flag.gif";
	  	loaded = 1
	  }
}

function newImage(arg) 
{
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() 
{
	if (document.images && (preloadforward == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}
// SHOW MENU
function showLayer(layerName)
{
	if (NS4 || IE4) {
	 if (timeOn != null) {
	  clearTimeout(timeOn)
	  hideLayer(onLayer)
	 }
	 if (NS4 || IE4) {
	  eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
	 }   
	 onLayer = layerName
	 }
}
	
// HIDE MENU
function hideLayer(layerName)
{
	 if (menuActive == 0) {
	  if (NS4 || IE4) {
	   if(layerName != null) {
	    eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
	   }
	  }
	 }
}
	
// TIMER FOR BUTTON MOUSE OUT
function btnTimer() 
{
	 timeOn = setTimeout("btnOut()",1000)
}
	
// BUTTON MOUSE OUT
function btnOut(layerName) 
{
	 if (menuActive == 0) {
	  hideLayer(onLayer)
	  }
}
	
// MENU MOUSE OVER  
function menuOver(itemName) 
{
	 clearTimeout(timeOn)
	 menuActive = 1
	 if (NS4 || IE4) {
	  if (NS4) {
	    document[onLayer].document.images[itemName].src = menu1.src
	 } else {
	     document.all[itemName].src = menu1.src
	 }
	 }
}
	
// MENU MOUSE OUT 
function menuOut(itemName) 
{
	 menuActive = 0 
	  if (NS4 || IE4) {
	  if (NS4) {
	    document[onLayer].document.images[itemName].src = menu0.src
	  } else {
	     document.all[itemName].src = menu0.src
	  }
	  }
	  timeOn = setTimeout("hideLayer(onLayer)", 400)
 }