
function ValidateTexboxLenghtMin4(sender, args)
{
    if (args.Value.length < 4)
    {
        args.IsValid = false;
        return;
    }
}

function ValidateTexboxLenght9(sender, args)
{
    if (args.Value.length != 9)
    {
        args.IsValid = false;
        return;
    }
}

function pencereAc(url,gen,yuk,scrl)
{
eval(window.open(url,"_blank","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+scrl+",resizable=0,width="+gen+",height="+yuk+",screenX=50,screenY=50,top=10,left=100"));
return false;
}


function kapat()
 {
 	 self.close();
 }

////////////////////////// SCRIPT 1 ///////////////////////////

if (document.images)
   {	 
   	 p1on= new Image(85,45);
     p1on.src="web_images\\dsn_06_02.gif";  

     p1off= new Image(85,45);
     p1off.src="web_images\\dsn_06_01.gif";
	 
	 p2on= new Image(84,45);
     p2on.src="web_images\\dsn_07_02.gif";  

     p2off= new Image(84,45);
     p2off.src="web_images\\dsn_07_01.gif";
	 
	 p3on= new Image(79,45);
     p3on.src="web_images\\dsn_08_02.gif";  

     p3off= new Image(79,45);
     p3off.src="web_images\\dsn_08_01.gif";
	 
	 p4on= new Image(96,45);
     p4on.src="web_images\\dsn_09_02.gif";  

     p4off= new Image(96,45);
     p4off.src="web_images\\dsn_09_01.gif";
	 
	 p5on= new Image(75,45);
     p5on.src="web_images\\dsn_10_02.gif";  

     p5off= new Image(75,45);
     p5off.src="web_images\\dsn_10_01.gif";
	 
   }

function lightup(imgName)
 {
   if (document.images)
    {
      imgOn=eval(imgName + "on.src");
      document[imgName].src= imgOn;
    }
 }

function turnoff(imgName)
 {
   if (document.images)
    {
      imgOff=eval(imgName + "off.src");
      document[imgName].src= imgOff;
    }
 }
 

////////////////////////// SCRIPT 2 ///////////////////////////

if (window.Event) // Only Netscape will have the CAPITAL E.
  document.captureEvents(Event.MOUSEUP); // catch the mouse up event

function nocontextmenu()  // this function only applies to IE4, ignored otherwise.
{
	event.cancelBubble = true
	event.returnValue = false;

	return false;
}

function norightclick(e)	// This function is used by all others
{
	if (window.Event)	// again, IE or NAV?
	{
		if (e.which == 2 || e.which == 3)
			return false;
	}
	else
		if (event.button == 2 || event.button == 3)
		{
			event.cancelBubble = true
			event.returnValue = false;
			return false;
		}
	
}

document.oncontextmenu = nocontextmenu;		// for IE5+
document.onmousedown = norightclick;		// for all others



////////////////////////// SCRIPT 3 (No Selecting) ///////////////////////////


function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}

//Sample usages
//disableSelection(document.body) //Disable text selection on entire body
//disableSelection(document.getElementById("mydiv")) //Disable text selection on element with id="mydiv"


