//CUSTOM FILE CONTAINING SELF CREATED JAVASCRIPT CODE
//Copyright flink.gr All rights reserved.

//--- THE FUNCTION "IMAGE_CHANGE" CHANGES THE IMAGES WITHOUT RELOADING THE WHOLE PAGE ---
function image_change(image_Name){
	//The image object accessed through its id we mentioned in the DIV block which is going to be visible currently
	var image = document.getElementById(image_Name);

	//An array that hold the IDs of images that we mentioned in their DIV blocks
	var image_Id = new Array();

//Storing the image IDs into the array starts here
	image_Id[0] = "image0";
	image_Id[1] = "image1";
	image_Id[2] = "image2";
	image_Id[3] = "image3";
	image_Id[4] = "image4";
	image_Id[5] = "image5";
	image_Id[6] = "image6";
	image_Id[7] = "image7";
	image_Id[8] = "image8";
	image_Id[9] = "image9";
	image_Id[10] = "image10";
	image_Id[11] = "image11";
	image_Id[12] = "image12";
	image_Id[13] = "image13";
	image_Id[14] = "image14";
	image_Id[15] = "image15";
	image_Id[16] = "image16";
	image_Id[17] = "image17";
	image_Id[18] = "image18";
	image_Id[19] = "image19";
	image_Id[20] = "image20";
	//image_Id[21] = "image21";
	//image_Id[22] = "image22";
	//image_Id[23] = "image23";
	//image_Id[24] = "image24";
	//image_Id[25] = "image25";
	//image_Id[26] = "image26";
	//image_Id[27] = "image27";
	//image_Id[28] = "image28";
	//image_Id[29] = "image29";
	//image_Id[30] = "image30";
	//Storing the image IDs into the array ends here
	
	//A counter variable going to use for iteration
	var i;

	//A variable that can hold all the other object references other than the object which is going to be visible
	var temp_image;

	//The following loop does the display of a single image based on its ID. The image whose ID we passed into this function will be the
	//only image that is displayed rest of the images will be hidden based on their IDs and that part has been handled by the else part
	//of the if statement within this loop.
	for(i=0;i<image_Id.length;i++)
	{
		if(image_Name == image_Id[i])
		{
			image.style.display = "block";
		}
		else
		{
			temp_image = document.getElementById(image_Id[i]);
			temp_image.style.display = "none";
		}
	}
	return;
}



//--- THE FUNCTION "DESCR_CHANGE" CHANGES THE DESCRIPTION OF THE IMAGES WITHOUT RELOADING THE WHOLE PAGE ---
function descr_change(descr_Name)
{
	//The image object accessed through its id we mentioned in the DIV block which is going to be visible currently
	var descr = document.getElementById(descr_Name);
		
	//An array that hold the IDs of images that we mentioned in their DIV blocks
	var text_Id = new Array();

	//Storing the image IDs into the array starts here
	text_Id[0] = "text0";
	text_Id[1] = "text1";
	text_Id[2] = "text2";
	text_Id[3] = "text3";
	text_Id[4] = "text4";
	text_Id[5] = "text5";
	text_Id[6] = "text6";
	text_Id[7] = "text7";
	text_Id[8] = "text8";
	text_Id[9] = "text9";
	text_Id[10] = "text10";
	text_Id[11] = "text11";
	text_Id[12] = "text12";
	text_Id[13] = "text13";
	text_Id[14] = "text14";
	text_Id[15] = "text15";
	text_Id[16] = "text16";
	text_Id[17] = "text17";
	text_Id[18] = "text18";
	text_Id[19] = "text19";
	text_Id[20] = "text20";
	//text_Id[21] = "text21";
	//text_Id[22] = "text22";
	//text_Id[23] = "text23";
	//text_Id[24] = "text24";
	//text_Id[25] = "text25";
	//text_Id[26] = "text26";
	//text_Id[27] = "text27";
	//text_Id[28] = "text28";
	//text_Id[29] = "text29";
	//text_Id[30] = "text30";
	//Storing the image IDs into the array ends here

	//A counter variable going to use for iteration
	var j;

	//A variable that can hold all the other object references other than the object which is going to be visible
	var temp_descr;

	//The following loop does the display of a single image based on its ID. The image whose ID we passed into this function will be the
	//only image that is displayed rest of the images will be hidden based on their IDs and that part has been handled by the else part
	//of the if statement within this loop.
	for(j=0;j<text_Id.length;j++)
	{
		if(descr_Name == text_Id[j])
		{
			descr.style.display = "block";
		}
		else
		{
			temp_descr = document.getElementById(text_Id[j]);
			temp_descr.style.display = "none";
		}
	}
	return;
}



function makevisible(cur,which){
	strength=(which==0)? 1 : 0.2
	if (cur.style.MozOpacity)
	cur.style.MozOpacity=strength
	else if (cur.filters)
	cur.filters.alpha.opacity=strength*100
}



//Script to disable right click in the page
var message="Right click is disabled";

function clickIE() {
if (document.all) {
(message);return false;}}

function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
