﻿/*FILE DESCRIPTION

SetImgOrFlash(Object name,Plan Image Source,Photo Image Source,Flash Movie Source, Directory Modifier);
	Put Flash movie or IMG objects in relation of if there is installed flash player

ChangeObject(Image ID,Image Source)
	Change img source in generated objects otherwise of flash movie

OpenPrices()
	Open New window for demonstration of WEB frame

PutPicturePath(modifier)
	Javascript version of function that generate automaticualy paths to pictures

PutObject(name,src1,src2,flash,modifier)
	Function Template!!!!

*/
/* FUNCTION DECLARATION */

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function SetPage(page)
{
	document.getElementById("page").value = page;	
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function SetImgOrFlash(name,src1,src2,flash,modifier)
{
		<!--
		// Version check based upon the values entered above in "Globals"
		var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
		// Check to see if the version meets the requirements for playback
		var alternateContent = "<ul>"
					+"<li>"
						+"<a>" 
						+"<img alt=\"pbtn_plan (1K)\" src=\"img/pbtn_plan.gif\" height=\"47\" width=\"51\" onclick=\"ChangeObject('"+name+"','"+PutPicturePath(modifier)+src1+".jpg');\" />"
						+"</a>"
					+"</li>"
					+"<li>"
						+"<a>"
							+"<img alt=\"pbtn_pho (1K)\" src=\"img/pbtn_pho.gif\" height=\"47\" width=\"51\" onclick=\"ChangeObject('"+name+"','"+PutPicturePath(modifier)+src2+".jpg');\" />"
						+"</a>"
					+"</li>"
				+"</ul>"
				+"<div id=\"win\">"
					+"<img src=\""+PutPicturePath(modifier)+src2+".jpg\" id=\""+name+"\" name=\""+name+"\" width=\"265\" height=\"222\" />"	
				+"</div>";
		
	var strFlash = "<OBJECT"
						+"ID=\""+name+"\" "
						+"NAME=\""+name+"\" "
						+"DATA=\""+PutPicturePath(modifier)+flash+".swf\" "
						+"SRC=\""+PutPicturePath(modifier)+flash+".swf\" " 
						+"CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" "
						+"WIDTH=\"330\" "
						+"HEIGHT=\"230\" "
						+"TITLE=\"PVC_Flash\" "
						+"CODEBASE=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" "
						+"TYPE=\"movie/flash\"> "
						
						+"<PARAM NAME=\"PVC_Flash\" VALUE=\""+PutPicturePath(modifier)+flash+".swf\"> "
						+"<PARAM NAME=\"MOVIE\" VALUE=\""+PutPicturePath(modifier)+flash+".swf\"> "
						+"<PARAM NAME=\"PLAY\" VALUE=\"true\"> "
						+"<PARAM NAME=\"LOOP\" VALUE=\"false\"> "
						+"<PARAM NAME=\"QUALITY\" VALUE=\"high\"> "
						+"<PARAM NAME=\"MENU\" VALUE=\"false\"> "
					
						+"<EMBED "
						+"SRC=\""+PutPicturePath(modifier)+flash+".swf\" "
						+"WIDTH=\"330\" HEIGHT=\"230\" "
						+"PLAY=\"true\" "
						+"LOOP=\"false\" "
						+"QUALITY=\"high\" "
						+"MENU=\"false\" "
						+"TYPE=\"application/x-shockwave-flash\" "
						+"PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"> "
						+"</EMBED> "
					+"</OBJECT> ";
					//alert(hasReqestedVersion + "     "+ GetSwfVer());
		//if (hasReqestedVersion)
			if ((GetSwfVer())&&(flash != ""))
				{
					document.write(strFlash);	
				}
				else
				{  // flash is too old or we can't detect the plugin
					document.write(alternateContent);  // insert non-flash content
			}
		// -->
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function PutMovieManifacture(name,src,flash,modifier)
{
	var strFlash = "<OBJECT"
						+"ID=\"Obkov\" "
						+"NAME=\"Obkov\" "
						+"DATA=\""+PutPicturePath(modifier)+flash+".swf\" "
						+"SRC=\""+PutPicturePath(modifier)+flash+".swf\" " 
						+"CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" "
						+"WIDTH=\"330\" "
						+"HEIGHT=\"230\" "
						+"TITLE=\"PVC_Flash\" "
						+"CODEBASE=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" "
						+"TYPE=\"movie/flash\"> "
						
						+"<PARAM NAME=\"PVC_Flash\" VALUE=\""+PutPicturePath(modifier)+flash+".swf\"> "
						+"<PARAM NAME=\"MOVIE\" VALUE=\""+PutPicturePath(modifier)+flash+".swf\"> "
						+"<PARAM NAME=\"PLAY\" VALUE=\"true\"> "
						+"<PARAM NAME=\"LOOP\" VALUE=\"false\"> "
						+"<PARAM NAME=\"QUALITY\" VALUE=\"high\"> "
						+"<PARAM NAME=\"MENU\" VALUE=\"false\"> "
					
						+"<EMBED "
						+"SRC=\""+PutPicturePath(modifier)+flash+".swf\" "
						+"WIDTH=\"330\" HEIGHT=\"230\" "
						+"PLAY=\"true\" "
						+"LOOP=\"false\" "
						+"QUALITY=\"high\" "
						+"MENU=\"false\" "
						+"TYPE=\"application/x-shockwave-flash\" "
						+"PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"> "
						+"</EMBED> "
					+"</OBJECT> ";
		var alternateContent = "<ul>"
  	+"<li><a href=\"\"><img alt=\"pbtn_pho (1K)\" src=\"img/pbtn_pho.gif\" height=\"47\" width=\"51\" /></a></li>"
  +"</ul>"
  +"<div id=\"win\">"
		+"<img alt=\"blank (1K)\" src=\""+PutPicturePath(modifier)+src+".jpg\" width=\"265\" height=\"220\" />"
	+"</div>";
	if(GetSwfVer())
			{
				document.write(strFlash);	
			}
			else
			{  // flash is too old or we can't detect the plugin
			 	
				document.write(alternateContent);  // insert non-flash content
		}
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function PutMovieBig(name,src,flash,modifier)
{
	var strFlash = "<OBJECT"
						+"ID=\"Big\" "
						+"NAME=\"Big\" "
						+"DATA=\""+PutPicturePath(modifier)+flash+".swf\" "
						+"SRC=\""+PutPicturePath(modifier)+flash+".swf\" " 
						+"CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" "
						+"WIDTH=\"340\" "
						+"HEIGHT=\"310\" "
						+"TITLE=\"Manifacture\" "
						+"CODEBASE=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" "
						+"TYPE=\"movie/flash\"> "
						
						+"<PARAM NAME=\"Manifacture\" VALUE=\""+PutPicturePath(modifier)+flash+".swf\"> "
						+"<PARAM NAME=\"MOVIE\" VALUE=\""+PutPicturePath(modifier)+flash+".swf\"> "
						+"<PARAM NAME=\"PLAY\" VALUE=\"true\"> "
						+"<PARAM NAME=\"LOOP\" VALUE=\"false\"> "
						+"<PARAM NAME=\"QUALITY\" VALUE=\"high\"> "
						+"<PARAM NAME=\"MENU\" VALUE=\"true\"> "
					
						+"<EMBED "
						+"SRC=\""+PutPicturePath(modifier)+flash+".swf\" "
						+"WIDTH=\"340\" HEIGHT=\"310\" "
						+"PLAY=\"true\" "
						+"LOOP=\"false\" "
						+"QUALITY=\"high\" "
						+"MENU=\"true\" "
						+"TYPE=\"application/x-shockwave-flash\" "
						+"PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"> "
						+"</EMBED> "
					+"</OBJECT> ";
		var alternateContent = "<ul>"
  	+"<li><a href=\"\"><img alt=\"pbtn_pho (1K)\" src=\"img/pbtn_pho.gif\" height=\"47\" width=\"51\" /></a></li>"
  +"</ul>"
  +"<div id=\"win\">"
		+"<img alt=\"blank (1K)\" src=\""+PutPicturePath(modifier)+src+".jpg\" width=\"340\" height=\"300\" />"
	+"</div>";
	if(GetSwfVer())
			{
				document.write(strFlash);	
			}
			else
			{  // flash is too old or we can't detect the plugin
			 	
				document.write(alternateContent);  // insert non-flash content
		}
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


function PutMovieGlass(name,src,flash,modifier)
{
	var strFlash = "<OBJECT"
						+"ID=\"Obkov\" "
						+"NAME=\"Obkov\" "
						+"DATA=\""+PutPicturePath(modifier)+flash+".swf\" "
						+"SRC=\""+PutPicturePath(modifier)+flash+".swf\" " 
						+"CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" "
						+"WIDTH=\"330\" "
						+"HEIGHT=\"230\" "
						+"TITLE=\"PVC_Flash\" "
						+"CODEBASE=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" "
						+"TYPE=\"movie/flash\"> "
						
						+"<PARAM NAME=\"PVC_Flash\" VALUE=\""+PutPicturePath(modifier)+flash+".swf\"> "
						+"<PARAM NAME=\"MOVIE\" VALUE=\""+PutPicturePath(modifier)+flash+".swf\"> "
						+"<PARAM NAME=\"PLAY\" VALUE=\"true\"> "
						+"<PARAM NAME=\"LOOP\" VALUE=\"false\"> "
						+"<PARAM NAME=\"QUALITY\" VALUE=\"high\"> "
						+"<PARAM NAME=\"MENU\" VALUE=\"false\"> "
					
						+"<EMBED "
						+"SRC=\""+PutPicturePath(modifier)+flash+".swf\" "
						+"WIDTH=\"330\" HEIGHT=\"230\" "
						+"PLAY=\"true\" "
						+"LOOP=\"false\" "
						+"QUALITY=\"high\" "
						+"MENU=\"false\" "
						+"TYPE=\"application/x-shockwave-flash\" "
						+"PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"> "
						+"</EMBED> "
					+"</OBJECT> ";
		var alternateContent = "<ul>"
  	+"<li><a href=\"\"><img alt=\"pbtn_pho (1K)\" src=\"img/pbtn_pho.gif\" height=\"47\" width=\"51\" /></a></li>"
  +"</ul>"
  +"<div id=\"win\">"
		+"<img alt=\"blank (1K)\" src=\""+PutPicturePath(modifier)+src+".jpg\" width=\"265\" height=\"220\" />"
	+"</div>";
	if(GetSwfVer())
			{
				document.write(strFlash);	
			}
			else
			{  // flash is too old or we can't detect the plugin
			 	
				document.write(alternateContent);  // insert non-flash content
		}
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function PutSnow()
{
	var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
		// Check to see if the version meets the requirements for playback
		var alternateContent = "<img alt=\"index (51K)\" src=\"img/index.jpg\" height=\"269\" width=\"573\" />";
		
	var strFlash = "<OBJECT"
						+"ID=\"snow\" "
						+"NAME=\"snow\" "
						+"DATA=\"lib/movie.swf\" "
						+"SRC=\"lib/movie.swf\" " 
						+"CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" "
						+"WIDTH=\"573\" "
						+"HEIGHT=\"269\" "
						+"TITLE=\"snow\" "
						+"CODEBASE=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" "
						+"TYPE=\"movie/flash\"> "
						
						//+"<PARAM NAME=\"PVC_Flash\" VALUE=\"lib/movie.swf\"> "
						+"<PARAM NAME=\"MOVIE\" VALUE=\"lib/movie.swf\"> "
						+"<PARAM NAME=\"PLAY\" VALUE=\"true\"> "
						+"<PARAM NAME=\"LOOP\" VALUE=\"false\"> "
						+"<PARAM NAME=\"QUALITY\" VALUE=\"high\"> "
						+"<PARAM NAME=\"MENU\" VALUE=\"false\"> "
					
						+"<EMBED "
						+"SRC=\"lib/movie.swf\" "
						+"WIDTH=\"573\" HEIGHT=\"269\" "
						+"PLAY=\"true\" "
						+"LOOP=\"false\" "
						+"QUALITY=\"high\" "
						+"MENU=\"false\" "
						+"TYPE=\"application/x-shockwave-flash\" "
						+"PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"> "
						+"</EMBED> "
					+"</OBJECT> ";
		//if (hasReqestedVersion)
		if(GetSwfVer())
			{
				document.write(strFlash);	
			}
			else
			{  // flash is too old or we can't detect the plugin
			 	
				document.write(alternateContent);  // insert non-flash content
		}
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function CheckForFlash()
{
	if(!GetSwfVer())
			{
				alert("<?php GetUsefull() ?>");
				document.write("<?php GetUsefull() ?>");
			}
	return 0;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function ChangeObject(id,imgsrc)
{
	Item = document.getElementById(id);
	Item.src = imgsrc;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function PutPicturePath(modifier)
{
	switch (modifier)
	{
		case "a":
			return "contents/about/img/";
		case "m":
			return "contents/manifacture/img/";
		case "p":
			return "contents/products/gallery/";
		case "u":
			return "contents/usefull/img/";
		default: "contents/usefull/img/";
	}
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function OpenPrices()
{
	window.open('../frameusermode/indexUser.aspx','frame');
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


function OpenPricesDistributors()
{
	//window.open('frame/index.aspx','frame','fullscreen = yes, resizeable=no, scrollbars = yes');
	//document.write("redirecting to startpage");
	//window.location="'/frame/index.aspx";
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




















////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/* NOT USEABLE RESERVED FUNCTIONS*/


