context: function hpInterceptHints() {	// modify the function which shows hints	//	JBC:    none	//	JCloze  v3-v6: ShowHint()	//	JCross  v3: Cheat(), v4: ShowHint(), v5-v6[HP5]: ShowHint(Across,x,y,BoxName), v6[HP6]: ShowHint(Across,ClueNum,x,y,BoxId)	//	JMatch: none	//	JMix    v5-v6: CheckAnswer(CheckType=1)	//	JQuiz   v3: CheckAnswer(ShowHint=true, QNum), v4: CheckAnswer(ShowHint=true), v5-v6[HP5]: CheckAnswer(ShowHint=true,QNum), v6[HP6]: ShowHint(QNum)	var x = ''; // extra code, if any		if (window.Cheat) {		// JCross v3 ?	} else if (window.ShowHint) {		var f = 'ShowHint';		var a = getFuncArgs(f, true);			if (a.length==0) {			if (window.FindCurrent) {				// JCloze v3-v6				x = 'var q=window.Locked?-1:FindCurrent();if(q>=0&&GetHint(q))hpClick(1,q);';			} else {				// JCross v4				// work out which box would have a hint added				// work out which question that box is part of using GridMap and WinLetters			}			} else if (a[0]=='Across') {			if (a[1]=='ClueNum') {				// JCross v6 [HP6]				x = "var args=new Array(ClueNum,Across?'A':'D');hpClick(1,args);";			} else if (a[1]=='x' && a[2]=='y') {				// JCross v5-v6 [HP5]				x = "var args=new Array(C[x][y],Across?'A':'D');hpClick(1,args);";			}			} else if (a[0]=='QNum') {			// JQuiz v6[HP6]			x = 'hpClick(1,QNum);';		}		} else if (window.CheckAnswer) {		var f = 'CheckAnswer';		var a = getFuncArgs(f, true);			if (a[0]=='ShowHint') {			if (a[1]=='QNum') {				// JQuiz v3, v5-v6[HP5]				x = 'if(ShowHint)hpClick(1,QNum);'; 			} else {				// JQuiz v4				x = 'if(ShowHint)hpClick(1,QNum-1);'; // QNum is a global variable			}		} else if (a[0]=='CheckType') {			// JMix v5-v6			x = 'if(CheckType==1)hpClick(1,0);'; // question number is always 0;		}	}	// add the e(x)tra code, if any, to the start of the hint (f)unction	if (x) {		var s = getFuncCode(f, x, '', true);		eval('window.' + f + '=new Function(' + getArgsStr(a) + 's);');	}}
meta: 2641	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2641/5237207862290e6950c71339743289f4d2d5f4d3/hotpot-full.js/buggy/mod/hotpot/hotpot-full.js