/***********************************************
* Start ShowMenuLink in mainIFrame
***********************************************/
function showPage(url){ // Functia incarca o pagina in IFRAME-ul cu id-ul "mainIFrame"	
	args = showPage.arguments;
	if(args.length==1){
		l = document.getElementById('mainIFrame');
		l.src=args[0];	
	}else{		
		location.replace(args[0] + "?page=" + args[1]);	
	}
	
	
}

function showParentPage(url){
	document.location=url;	
}


function showStatus(){
	window.status = "Prodigy Technologies";
}

function tellTitle(title){//----
	document.bookmark.pageTitle.value=title;	
}

function findObj(n) { 
    return document.getElementById(n); 
}

function openWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/***********************************************
* Stop ShowMenuLink in mainIFrame
***********************************************/

/***********************************************
*Start Set IFrame Height
***********************************************/
function getDocHeight(doc) {
  var docHt = 0, sh, oh;
  if (doc.height) docHt = doc.height;
  else if (doc.body) {
    if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
    if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
    if (sh && oh) docHt = Math.max(sh, oh);
  }
  return docHt;
}

function adjustIFrameSize(iframeName) {
  var iframeName = "mainIFrame";
  var iframeWin = window.frames[iframeName];
  var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null;
  if ( iframeEl && iframeWin ) {
    iframeEl.style.height = "auto"; // helps resize (for some) if new doc shorter than previous  
    var docHt = getDocHeight(iframeWin.document);
    // need to add to height to be sure it will all show
    if (docHt) iframeEl.style.height = docHt + 5 + "px";
  }
}
/***********************************************
*Stop Set IFrame Height
***********************************************/

/***********************************************
* Start Swap functions
***********************************************/
function swapImage() { // Functie folosita in general pentru image swap
  showStatus();
  var a=usualSwapImage.arguments; 
  if ((z=findObj(a[0]))!=null){
  	if(!z.oSrc) 
		z.oSrc=z.src; 
	z.src=a[1];
	}
}

function restoreImage() { // Functie pentru restore in general
   	z.src=z.oSrc;	
}/***********************************************
* Stop Swap functions
***********************************************/